Hi,

Trying to do unions with DBIx::Class, installed DBIx::Class::Helpers and
then followed docs.  Loaded component in the result class files:

package MyApp::Schema::Result::GeneSetAnnotation;
use base 'DBIx::Class::Core';
__PACKAGE__->load_components(qw/Helper::ResultSet::SetOperations/);

and...

package MyApp::Schema::Result::ContrastDataSetAnnotation;
use base 'DBIx::Class::Core';
__PACKAGE__->load_components(qw/Helper::ResultSet::SetOperations/);

Then in my code I wrote the following:

my @annotations =
$schema->resultset('ContrastDataSetAnnotation')->search(undef, {
    columns => [qw( name value )],
})->union($schema->resultset('GeneSetAnnotation')->search(undef, {
    columns => [qw( name value )],
}))->all();

I get there error:

Can't locate object method "union" via package "DBIx::Class::ResultSet" at
./test_union.pl line 15.  What am I doing wrong?

regards,
Leandro
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to