Hi,
We are using H2 extensively for unit testing our Hibernate based 
application.  We are experiencing a problem on a delete with a sub-select.  
The following SQL does not delete any rows in our test (two rows should be 
deleted):

delete from PERSON where TYPE='P' and  not (exists (select user1_.ID from 
USER_DETAILS user1_ where user1_.PERSON_ID=ID))

If an alias for PERSON is introduced, the two rows are successfully deleted:

delete from PERSON p where p.TYPE='P' and  not (exists (select user1_.ID 
from USER_DETAILS user1_ where user1_.PERSON_ID=p.ID))

Unfortunately the first version is being generated by Hibernate so it is 
not easy to add the alias.  Any suggestions?

We are using H2 version 1.3.172. 

Regards,
    Steve P

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to