Yo Mr. Froestel,
thx for your help (again ;-) ),
I use PostgreSQL 8.4 btw.
On page 113 of the hibernate reference they write that it's plain SQL code to go into the <bag ... where="<SQL>"> condition.
Quote:
where (optional): specifies an arbitrary SQL WHERE condition that is used when retrieving or removing the collection. This is useful if the collection needs to contain only a subset of the available data.
I already tried several variations like what you suggested, replacing false by 0. which got 'rendered' to
Code:
SELECT ..... where ( editi0_.optout=0)
Unfortunately PostgreSQL doesn't interpret 0 as false.
I've also tried
Code:
where="optout=false"
where="optout=FALSE"
where="optout<>true"
where="optout is false"
where="optout=#false"
where="optout='false'"
where="optout=0"
where="optout=1"
They all did not work.
The generated code was always like that one (except for 0 and 1)
Code:
SELECT ..... where ( editi0_.optout=editi0_.false)
If I replace editi0_.false by false and send it directly via pgAdminIII to the DB it works fine.
Code:
SELECT ..... where ( editi0_.optout=false)
Maybe it's a bug? In my mind it looks like Hibernate thinks that false is a column of the edition table. Or maybe there is a special syntax or escape sequence needed.
Greetings
Humppa!