From the [forum|https://forum.hibernate.org/viewtopic.php?f=31&t=1040262]:
The following assertions fail, although the reference {{Hike#organizer}} is populated (and can be navigated when loading the referencing hike by id):
{code} Hike loadedHike = entityManager .createQuery("SELECT H From Hike H WHERE id = :id", Hike.class) .setParameter("id", cornwall.getId()).getSingleResult();
assertThat(loadedHike.getOrganizer()).isNotNull(); {code}
{code} Hike loadedHike = (Hike) entityManager.createNativeQuery( "MATCH ( n:Hike { id:'" + cornwall.getId() + "' } ) " + "\n" + "RETURN n", Hike.class).getSingleResult();
assertThat(loadedHike.getOrganizer()).isNotNull(); {code}
|