use of org.hibernate.test.annotations.id.sequences.entities.HibernateSequenceEntity in project hibernate-orm by hibernate.
the class HibernateSequenceTest method testHibernateSequenceNextVal.
@Test
public void testHibernateSequenceNextVal() {
Session session = openSession();
Transaction txn = session.beginTransaction();
HibernateSequenceEntity entity = new HibernateSequenceEntity();
entity.setText("sample text");
session.save(entity);
txn.commit();
session.close();
Assert.assertNotNull(entity.getId());
}
Aggregations