How can I access joined part of Query ?
http://docs.jboss.org/hibernate/entitymanager/3.6/reference/en/html/querycriteria.html#querycriteria-from-join :
Quote:
CriteriaQuery<Person> personCriteria = builder.createQuery( Person.class );
Root<Person> personRoot = person.from( Person.class );
// Person.address is an embedded attribute
Join<Person,Address> personAddress = personRoot.join( Person_.address );
// Address.country is a ManyToOne
Join<Address,Country> addressCountry = personAddress.join( Address_.country );
In documentation there is no code showing how to access address or country part of query,
I am able only to get persons, which are multiplied by joined relations, but I cannot access address and country.