You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Clute, Andrew" <An...@osn.state.oh.us> on 2005/01/11 19:59:57 UTC

Decomposed Collection and isNull() -- How to make it work?

If I have a collection descriptor that is mapped via a decomposed M:N
relationship, it errors out when I attempt to add an isNull criteria for
the relationship.
 
For example:
 
I have an object 'foo'
It has a collection of objects 'bar' that is mapped via an
indirection-table and an M:N relationship, and the collection field name
on 'foo' is called 'bars'.
When I attempt to do criteria.addEqualTo("bars.name","Cool") -- that
works fine. It will add the inner join correctly.
 
However, when I do criteria.isNull("bars"), it pukes and attempts to add
the field name in to the generated SQL query. It doesn't add the inner
join to the indirection table, and then add the IS NULL criteria on
that.
 
 
Am I missing something, or is this a legit bug?
 
-Andrew