[Dbix-class] Incorrect SQL for many_to_many?

Alex Povolotsky tarkhil at over.ru
Tue Apr 1 13:35:36 BST 2008


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.




More information about the DBIx-Class mailing list