@Test
public void hhhXXXXTest() throws Exception {
try (Session s = openSession()) {
Transaction tx = s.beginTransaction();
EntityA entityA = new EntityA();
s.persist(entityA);
tx.commit();
}
try (Session s = openSession()) {
Query<EntityA> query = s.createQuery("select coalesce(par, a) from EntityA a left join a.parent par",
EntityA.class);
List<EntityA> actual = query.getResultList();
assertThat(actual).hasSize(1);
}
}