jsr338-experts@jpa-spec.java.net

[jsr338-experts] Re: outer joins with ON conditions

From: Emmanuel Bernard <emmanuel.bernard_at_jboss.com>
Date: Wed, 16 Mar 2011 11:46:16 +0100

On 15 mars 2011, at 19:16, Linda DeMichiel wrote:

>
> JPQL would be:
>
> FROM Cat as cat LEFT JOIN Kittens k ON k.bodyWeight > 10.0 AND k.parentName = cat.Name

But in this case, the SQL would be

from Cat c OUTER JOIN Kitten k ON c.id = k.parent AND c.name = k.parentName AND k.bodyWeight > 10.0

which is one to many clause for what the user wants to do.