HHH-7205: Added test to show bug exists when execute session.get after session.load for not-existing entity

This commit is contained in:
akotlyarov 2014-01-25 22:16:07 +02:00 committed by Brett Meyer
parent bfd63f1fec
commit a1ea2deb7d
1 changed files with 14 additions and 0 deletions

View File

@ -87,5 +87,19 @@ public class LoaderTest extends BaseCoreFunctionalTestCase {
s.close(); s.close();
} }
} }
@Test
public void testGetNotExisting() {
Session s = openSession();
try {
long notExistingId = 3l;
s.load( Team.class, notExistingId );
s.get( Team.class, notExistingId );
}
finally {
s.close();
}
}
} }