| ... | ... |
@@ -1,5 +1,6 @@ |
| 1 | 1 |
0.1649 |
| 2 |
- - DBIx::Custom::Model select() think about relation attirbute |
|
| 2 |
+ - add DBIx::Custom::Model column_clause() method. |
|
| 3 |
+ - DBIx::Custom::Model select() and select_at() think about relation attirbute |
|
| 3 | 4 |
0.1648 |
| 4 | 5 |
- add experimental DBIx::Custom::Model relation() attribute |
| 5 | 6 |
- add experimental update_at(), delete_at(), select_at() |
| ... | ... |
@@ -1090,6 +1090,12 @@ This method is needed to be call after C<include_model()>. |
| 1090 | 1090 |
|
| 1091 | 1091 |
$dbi->setup_model; |
| 1092 | 1092 |
|
| 1093 |
+You can set C<relation> |
|
| 1094 |
+ |
|
| 1095 |
+ $model->relation({'book.company_id' => 'company.id'});
|
|
| 1096 |
+ |
|
| 1097 |
+This relation is used by C<select()>, C<select_at()> |
|
| 1098 |
+ |
|
| 1093 | 1099 |
=head2 Model Examples |
| 1094 | 1100 |
|
| 1095 | 1101 |
Model examples |
| ... | ... |
@@ -1125,6 +1125,12 @@ C<select_at()>で利用されます。 |
| 1125 | 1125 |
|
| 1126 | 1126 |
$dbi->setup_model; |
| 1127 | 1127 |
|
| 1128 |
+モデルにはリレーションを設定することもできます。 |
|
| 1129 |
+ |
|
| 1130 |
+ $model->relation({'book.company_id' => 'company.id'});
|
|
| 1131 |
+ |
|
| 1132 |
+ここで設定したリレーションはC<select()>, C<select_at()>で利用されます。 |
|
| 1133 |
+ |
|
| 1128 | 1134 |
=head2 モデルのサンプル |
| 1129 | 1135 |
|
| 1130 | 1136 |
モデルのサンプルです。 |