[Hibernate] How to do Hibernate2's session.delete("from Holder") in Hibernate3 ?

2004-10-28 Thread Dongsheng Song
How to do Hibernate2's session.delete("from Holder") in Hibernate3 ? I want to do batch delete SQL action, e.g. delete from TABLE or delete from TABLE where TABLE.FIELD='A' or delete from TABLE where TABLE.FIELD=? I can't find any such examples in Hibernate3 test program or docs. Thank for

Re: [Hibernate] How to do Hibernate2's session.delete("from Holder") in Hibernate3 ?

2004-10-28 Thread Gavin King
True support for batch delete will be added as a new feature of HQL in Hibernate 3.1. For now, simply run a query and then delete each query result. Dongsheng Song wrote: >How to do Hibernate2's session.delete("from Holder") in Hibernate3 ? > >I want to do batch delete SQL action, e.g. > >delete

Re: [Hibernate] where clause for collections.

2004-10-28 Thread Gavin King
And this is what? A collection loader? A HQL query? Caldas, Marcelo wrote: Here's a snapshot of what's going on: Hibernate: select orgtypes0_.organization_id as organiza5___, orgtypes0_.organization_type_id as organiza1___, orgtypes0_.organization_type_id as organiza1_2_, orgtypes0_._version as _ve

FW: [Hibernate] where clause for collections.

2004-10-28 Thread Caldas, Marcelo
For this specific scenario, I'm loading a Organization object using session.get(Organization.class, pk); Organization has a SET mapped for orgTypes. (One organization has many orgTypes) I'm not using lazy loading for now, so hibernate is loading all the orgTypes for that specific organization. Tha

[Hibernate] Interceptor

2004-10-28 Thread Caldas, Marcelo
Hi,   I’ve been trying to use the interceptor, but the previousState is populated only when inserting. Never on an update. For both onFlushDirty() and findDirty() methods.   Is this supposed to be normal behavior?   I was trying to do the same thing the documentation is doing  - set t