- Deprecate legacy $rs->search( %condition ) syntax
- NULL is now supplied unquoted to all debug-objects, in order to
differentiate between a real NULL and the string 'NULL'
+ - +columns now behaves just like columns by not stripping a
+ fully-qualified 'as' spec (i.e. foo.bar results in $obj->foo->bar)
* Fixes
- Fixed read-only attribute set attempt in ::Storage::Replicated
$_->{as} = [ map { $_ =~ /^\Q$alias.\E(.+)$/ ? $1 : $_ } @{$_->{as}} ];
}
- # FIXME !!!
- # Blatant bugwardness encoded into multiple tests.
- # While columns behaves sensibly, +columns is expected
- # to dump *any* foreign columns into the main object
- # /me vomits
- $selection_pieces->{'+columns'}{as} = [ map
- { (split /\./, $_)[-1] }
- @{$selection_pieces->{'+columns'}{as}}
- ];
-
# merge everything
for (@sel_pairs) {
$attrs->{select} = $self->_merge_attr ($attrs->{select}, $selection_pieces->{$_}{select});
$cd = $schema->resultset("CD")->search({ title => 'Spoonful of bees' }, { columns => ['title'] })->next;
is($cd->title, 'Spoonful of bees', 'subset of columns returned correctly');
-$cd = $schema->resultset("CD")->search(undef, { include_columns => [ 'artist.name' ], join => [ 'artist' ] })->find(1);
+$cd = $schema->resultset("CD")->search(undef, { include_columns => [ { name => 'artist.name' } ], join => [ 'artist' ] })->find(1);
is($cd->title, 'Spoonful of bees', 'Correct CD returned with include');
is($cd->get_column('name'), 'Caterwauler McCrae', 'Additional column returned');
# check if new syntax +columns also works for this
-$cd = $schema->resultset("CD")->search(undef, { '+columns' => [ 'artist.name' ], join => [ 'artist' ] })->find(1);
+$cd = $schema->resultset("CD")->search(undef, { '+columns' => [ { name => 'artist.name' } ], join => [ 'artist' ] })->find(1);
is($cd->title, 'Spoonful of bees', 'Correct CD returned with include');
is($cd->get_column('name'), 'Caterwauler McCrae', 'Additional column returned');