Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.0
Hi forum,
I'm currently evaluating hibernate, which appear to be a great tool !!
Thanks guyzz for it !!!!
Doing bqsic tests on simple objects, I realize the following :
Code:
session.delete(objX);
transaction.commit();
does delete correponding row in database (yeaahh!!!) but not in
memory ! List containing this object still refers to it ! (Knowing that this
list was built before the "delete" line using a query with createQuery(....)).
Manual says, section 10.8 :
Quote:
It's best to think of
Code:
delete()
as making a persistent
instance transient.
OK !For me, that's the reason.
My question : does anybody knows how to also remove the deleted
object from memory automatically, as I do not want to manage garbage
collection (I know , I know, too lazy) ?
Thanks in advance for your answers/suggestions/advisories/....