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
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
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
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
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