Hey there.

When I DO a search with both a 'join' and a 'columns' attribute, like so:


blabla('Equipment')->search({type => 'BLADE'},{join => ['equipment_type_id'],'columns' => ['equipment.id', 'equipment.serial_no'],});

.. somehow the columns-attribute is completely ignored, and I get an error, because the SELECT generated defaults (?) to the 'id' column, which is in both tables (and thus is ambiguous).

The select generated, for reference is:

"SELECT id FROM equipment me JOIN equipment_type equipment_type_id ON ( equipment_type_id.id = me.equipment_type_id ) WHERE ( type = ? )"

Substituting 'columns' with a 'select' attribute has no effect.

Using 'include_columns' instead appends the columns to the select, but still includes the 'id' at the beginning. The docs say that all are prepended with 'me.', but that does not happen here.

Using search with 'columns', but without 'join', works fine.

If I missed some vital clue, please, let me know. Otherwise: What gives?

--
Adam Hasselbalch Hansen
UNIX Systems Developer, CPH
e: [EMAIL PROTECTED], w: www.one.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