Issue Type: Bug Bug
Affects Versions: 4.2.2
Assignee: Unassigned
Components: core
Created: 14/Jun/13 8:41 AM
Description:

An ObjectNotFound exception is thrown 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 7, PG-SQL
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