use of org.hibernate.test.annotations.id.sequences.entities.Location in project hibernate-orm by hibernate.
the class IdClassTest method testIdClassInSuperclass.
@Test
public void testIdClassInSuperclass() throws Exception {
Tower tower = new Tower();
tower.latitude = 10.3;
tower.longitude = 45.4;
Session s = openSession();
Transaction tx = s.beginTransaction();
s.persist(tower);
s.flush();
s.clear();
Location loc = new Location();
loc.latitude = tower.latitude;
loc.longitude = tower.longitude;
assertNotNull(s.get(Tower.class, loc));
tx.rollback();
s.close();
}
Aggregations