Issue Type: Bug Bug
Affects Versions: 4.1.11
Assignee: Unassigned
Components: core
Created: 28/May/13 4:17 AM
Description:

An ObjectNotFound exception is throws trying to access to a deleted object.

//Creation
Transaction transaction = session.session.beginTransaction();
Person person = new Person(idPers);
Address address = new Address(idAddr);
address.setPerson(person);
person.addAddress(address);
session.save(person);
session.save(address);
transaction.commit();
session.clear();

//Now, reproduction of problem
session.beginTransaction();

//this call is necessary for reproduction of problem
session.get(Address.class, idAddr);

Person reloadedPerson = (Person) session.get(Person.class, idPers);
session.delete(reloadPerson);

//Here the exception
Person expectedNullPerson= (Person) session.get(Person.class, idPers);

Calling session.get(Address.class, idAddr); make reloadedPerson a javassit, when it is not called, "expectedNullPerson" is null.

Environment: Java 1.7, Hibernate 4.1.11 (tested also with 4.2), Postgesql
Project: Hibernate ORM
Priority: Major Major
Reporter: William Betremieux
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira