On Mon, Jun 7, 2010 at 12:19 PM, Mark A. Stratman <[email protected]>wrote:

> Is this a bug, or a necessary behavior? Or is there another way I should be
> doing a prefetch with +select?
>
> $row = $rs->search({}, {
>    '+select' => \'lower(something)',
>    'prefetch' => "relationship",
> })->first;
>
> $row->relationship->first_column; # has the value of 'lower(something)'.
>
> That is to say, every field in the "relationship" is shifted over by the
> +select.
>

First off, could you grab the DBIC source and try to write a failing test
that would do what you expect?  We'd really appreciate it...

Second, and more importantly for you I guess, is that generally a +select
needs a related +as.  If you do the first thing we can make it work, in the
meantime, adding an +as should fix your issue.
-- 
fREW Schmidt
http://blog.afoolishmanifesto.com
_______________________________________________
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