[Hibernate] 'where' in collections tags

2003-09-01 Thread Germán Ruiz
Hi. I'm tried to use a where parameter in a set tag with an exists clause and I've an error. My mapping is similar to: set name=persons lazy=true where=not exists ( from myapp.Person as other where other.id = id) . and the generated SQL is like select plan_tip0_.USER_ID as

[Hibernate] 'where' in collections tags

2003-09-01 Thread Germán Ruiz
Hi. I'm tried to use a where parameter in a set tag with an exists clause and I've an error. My mapping is similar to: set name=persons lazy=true where=not exists ( from myapp.Person as other where other.id = id) . and the generated SQL is like select plan_tip0_.USER_ID as

Re: [Hibernate] 'where' in collections tags

2003-09-01 Thread Gavin King
The where attribute takes an *SQL* fragment, not a HQL fragment, And the braindead parser will recognize a function iff you nest the paren right up close like this: exists(, instead of this: exists (. If you want to use subqueries, etc in where fragments, you MUST be using Hibernate 2.1. Hi.