Re: Qualifier involving many-to-many relationship

2015-01-28 Thread Paul Hoadley
On 29 Jan 2015, at 2:52 pm, Paul Hoadley wrote: >> So, here’s my recommendation: >> >> 1) Make your “Connection” entity have a single integer primary key. Do not >> have a compound PK. > > Is a compound PK going to prevent ERXExistsQualifier working in a case like > this? I can make the chan

Re: Qualifier involving many-to-many relationship

2015-01-28 Thread Paul Hoadley
Hi Aaron, On 29 Jan 2015, at 2:04 pm, Aaron Rosenzweig wrote: > When you turn on the SQL adaptor debugging it will become clear what it is > doing wrong. Then you’ll go “duh!" The generated SQL is: SELECT t0.id, t0.id_no, t0.user_id FROM teacher t0 INNER JOIN connection T1 ON t0.id = T1.teac

Re: Qualifier involving many-to-many relationship

2015-01-28 Thread Aaron Rosenzweig
Hi Paul, When you turn on the SQL adaptor debugging it will become clear what it is doing wrong. Then you’ll go “duh!" It is probably one of those cases where the “joins” that get created don’t make sense in the full context of the query. It’s probably the Object-Relationional “impedance misma

Qualifier involving many-to-many relationship

2015-01-28 Thread Paul Hoadley
Hello, I have two entities in a model: Teacher and School. There is a many-to-many relationship between Teacher and School, represented as Connection, a join entity. So, Teacher and School both have a 'connections' relationship, and Connection has both 'teacher' and 'school'. There are no fl