Did you try criteria.isNull("bars.name"); -----Original Message----- From: Clute, Andrew [mailto:[EMAIL PROTECTED] Sent: Friday, January 14, 2005 9:15 AM To: OJB Users List Subject: RE: Decomposed Collection and isNull() -- How to make it work?
I am going to assume with the silence that I am pretty much screwed? ;) -Andrew -----Original Message----- From: Clute, Andrew [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 11, 2005 2:00 PM To: OJB Users List Subject: 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]