What I have right now is:
Getting a List<Town>
with all neighborhoods & etc:
(Town) em.createQuery(from Town towns"
+ " left join fetch towns.neighborhoods neighborhood"
+ " left join fetch neighborhood.population population"
+ " left join fetch population.age age"
+ " where age.value = :ageValue")
.setParameter("ageValue", ageValue)
I want to be getting a List<Town>
with only one neighborhood which is the first at neighborhood.creationDate
.
How do I do that ?
I don't want to get them all and remove it after.
Thank you.