Hibernate 3.0.3
I noticed that when I do a bulk delete I have to execute
Code:
Session.flush();
Session.clear();
or else the lazy-loading proxies remain in memory and when I invoke Session.get(Class Clazz, Serializable id) later on it returns a proxy that points to a nonexistant row.
Is this a bug?
The reference documentation doesn't seem to discuss what happens to proxies after a bulk delete. In the example they give, they close the transaction right after the update operation so obviously they don't run into the same problem as me. I'm trying to execute queries immediately after a bulk delete without closing the transaction or session like is done in the example.
Ideas?
Gili