Hi,

Sorry for not writing to the DBIC mailing list, but it rejects my messages
as SPAM.

I have tried the following select from the table "user":

return $self->search_rs({},{
prefetch => {blogs => 'blog_comments'},
'+select' => ['me.id'],
'+as' => ['user_id'],
});

The table user has_many blogs and it also has_many blog_comments.

The table blog has_many blog_comments and belongs_to user.

The table blog_comment belongs_to user and belongs_to blog.

The problem is that the +select and +as options have no effect, and the
query above returns all the columns from all 3 tables, no matter what
columns I select.

It seems to work only if I use "join" instead of "prefetch" and "select" and
"as" instead of "+select" and "+as".

I use ActivePerl 5.10.1 and the latest versions of DBIx::Class and
SQL::Abstract.

Is there a bug or I am missing something obvious, or it is just not possible
what I want?

Thank you.

Octavian


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to