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 50d1be9e2d
commit 2ecd96158e
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();
}
}
} }