... | ... |
@@ -1,6 +1,7 @@ |
1 | 1 |
0.1666 |
2 | 2 |
- removed from cache() and cache_method() document for a while and cache() value |
3 | 3 |
become 0 because I find something bug. |
4 |
+ - create_model() return model. |
|
4 | 5 |
|
5 | 6 |
0.1665 |
6 | 7 |
- removed EXPERIMETNAL flag from insert_at(), update_at(), delete_at(), select_at(), insert_param(), not_exists(), select()'s query option, update_param(), where, table tag, each column, safety_character, DBIx::Where, where(). |
... | ... |
@@ -371,7 +371,7 @@ sub create_model { |
371 | 371 |
# Set model |
372 | 372 |
$self->model($model->name, $model); |
373 | 373 |
|
374 |
- return $self; |
|
374 |
+ return $self->model($model->name); |
|
375 | 375 |
} |
376 | 376 |
|
377 | 377 |
sub each_column { |
... | ... |
@@ -66,6 +66,7 @@ my $update_query; |
66 | 66 |
my $ret_val; |
67 | 67 |
my $infos; |
68 | 68 |
my $model; |
69 |
+my $model2; |
|
69 | 70 |
my $where; |
70 | 71 |
my $update_param; |
71 | 72 |
my $insert_param; |
... | ... |
@@ -1953,7 +1954,7 @@ $dbi->create_model( |
1953 | 1954 |
], |
1954 | 1955 |
primary_key => ['key1'] |
1955 | 1956 |
); |
1956 |
-$dbi->create_model( |
|
1957 |
+$model2 = $dbi->create_model( |
|
1957 | 1958 |
table => 'table2' |
1958 | 1959 |
); |
1959 | 1960 |
$dbi->create_model( |
... | ... |
@@ -1972,4 +1973,5 @@ $result = $model->select( |
1972 | 1973 |
); |
1973 | 1974 |
is_deeply($result->fetch_hash_first, |
1974 | 1975 |
{key1 => 1, key2 => 2, 'table2__key1' => 1, 'table2__key3' => 3}); |
1976 |
+is_deeply($model2->select->fetch_hash_first, {key1 => 1, key3 => 3}); |
|
1975 | 1977 |
|