mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-09 04:34:49 +00:00
HHH-7205: Added test to show bug exists when execute session.get after session.load for not-existing entity
This commit is contained in:
parent
c26a3fd732
commit
58e6e47ea4
@ -87,5 +87,19 @@ public void testBasic() throws Exception {
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user