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
50d1be9e2d
commit
2ecd96158e
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue