Noel Burton-Krahn wrote:
> On Tue, Nov 25, 2008 at 9:45 AM, Peter Rabbitson <[EMAIL PROTECTED]> wrote:
>> As far as the don't repeat yourself - what do you propose? Your query
>> (the join-ed one) selects from two tables that have the same column.
>> Unless you specify which column you are interested in, it is not safe
>> for DBIC to assume something on its own. Either rename your columns to
>> be globally unique (ugly), or qualify your column names when necessary
>> (smart).
>>
> 
> The problem is that DBIx has the "smarts" to prefix column names in
> the select clause, like "select me.id, cds.id" but not in the where
> clause "where id=?". 

How does DBIC know if the user meant 'where me.id = ?' and not 'where
cds.id = ?'. Blindly prefixing stuff with 'me' is plain wrong.

_______________________________________________
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/dbix-class@lists.scsys.co.uk

Reply via email to