Azuo Lee commented on Bug HHH-7205

This problem lasts for years, and can be easily reproduced by writing the following 2 lines together:

session.load(SomeEntity.class, "a-non-exist-identifier");
session.get(SomeEntity.class, "a-non-exist-identifier");

The second get() will definitely throw ObjectNotFoundException, because there's already a proxy in the cache but no corresponding row in the database.

But according to the documentation, get() should return null and never throw ObjectNotFoundException for a non-existent entity. What the document says is wrong, or what get() does is wrong?

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