Please post your search which leads to the problem and the relationships 
specified in your table classes as well please.
But I think you missed the point that many_to_many is a helper and no real 
relationship which can be used for searches.

-Alex


-----Original Message-----
From: Alex Povolotsky [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2008 2:36 PM
To: Class user and developer list
Subject: [Dbix-class] Incorrect SQL for many_to_many?

Hello!

I recall that the problem has been discussed here some times ago, but I
could not found it.

DBIx::Class (sometimes?) creates incorrect select for many_to_many
relation, like

SELECT id_abonent FROM alarm_to_abonent me  JOIN abonent id_abonent ON (
id_abonent.id_abonent = me.id_abonent ) WHERE ( me.id_alarm = ? )

instead of

SELECT id_abonent.id_abonent FROM alarm_to_abonent me  JOIN abonent
id_abonent ON ( id_abonent.id_abonent = me.id_abonent ) WHERE (
me.id_alarm = ? )

I've tried to trace the problem, but DBIx::Class code is too much to me :(

Alex.


_______________________________________________
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]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
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