@Test
public void testSubTypePropertyReferencedFromEntityJoinInSyntheticSubquery() {
doInJPA(this::sessionFactory, em -> {
List<Tuple> resultList = em.createQuery(
"SELECT subB_0.id, subA_0.id, subB_0.id, subA_0.id FROM SubB subB_0 INNER JOIN SubA subA_0 ON 1=1 WHERE (EXISTS (SELECT 1 FROM subB_0.parent _synth_subquery_0 WHERE subA_0.id = _synth_subquery_0.id)) ORDER BY subB_0.id ASC, subA_0.id ASC", Tuple.class)
.getResultList();
assertEquals(1, resultList.size());
});
}