EntityA has a 1-1 relationship to EntityB. The EntityB has a array list
of EntityCs, so Entity B has a 1-to-many relationship to EntityC.

Let say EntityA is employee. EntityB is the personal data record of the
employee. EntityC is the phone numbers of the employee.

One employee can have only one personal record but can have multiple
phone numbers. An employee's personal record has 1-to-many
relationship to phone numbers.

What I am trying to do with JPQL is to query uniqueID of the employee
(which is defined in EntityA) by giving one of his phone numbers.

In database terms, this is a join of all three tables, but I am not sure
how can you write such a query in JPQL.

Is it possible to write queries operating on joins in JPQL ?

Gul

Reply via email to