I running JBoss 3.0.6 and using CMP. I have a 1-to-many relation between 2 beans and have defined an ejb-ql query like (note the beans on the many side have a many-1 relation with another bean).
FROM UserListEntity list, IN(list.entityCollection) proxy
WHERE list.PUID=?1 AND proxy.subjectEntity.PUID=?2
In looking at the JBoss log the SQL for this query is generated correctly. It succeeeds and finds the correct primary key for the proxy item. JBoss then tries to load the "list" entity using the primary key of the proxy entity the SQL statement returns. It should be loading the "proxy" entity. This finder is defined on the home interfacef or the "list" entity.
Does anyone have any idea, what I've done wrong. If the relation in the ejb-jar is wrong, I woulnd't expect the correct SQL to be generated as it is.