You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by mpf <mr...@gmail.com> on 2011/06/30 13:40:03 UTC
openJPA 1.2 - LEFT OUTER JOIN problem with ALIAS
Hi!
I tried following:
SELECT p
FROM Person p LEFT JOIN FETCH p.fruehereNamenListe f
WHERE ( LOWER(p.nachname) LIKE :nachname OR LOWER(f.nachname) LIKE
:fNachname )
Exception:
javax.ejb.EJBException: See nested exception; nested exception is:
<openjpa-1.2.3-SNAPSHOT-r422266:965640 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: Encountered "f" at
character 61, but expected: [",", ".", "GROUP", "HAVING", "INNER", "JOIN",
"LEFT", "ORDER", "WHERE", <EOF>].
Does Alias dont work wir LEFT JOINS? Bug? Or did I something wrong?
regards
--
View this message in context: http://openjpa.208410.n2.nabble.com/openJPA-1-2-LEFT-OUTER-JOIN-problem-with-ALIAS-tp6532856p6532856.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: openJPA 1.2 - LEFT OUTER JOIN problem with ALIAS
Posted by Harald Wellmann <ha...@gmx.de>.
In JPA, you cannot use aliases for FETCH JOINs. Remove FETCH and your
query should work.
Regards,
Harald
Am 30.06.2011 13:40, schrieb mpf:
> Hi!
> I tried following:
>
> SELECT p
> FROM Person p LEFT JOIN FETCH p.fruehereNamenListe f
> WHERE ( LOWER(p.nachname) LIKE :nachname OR LOWER(f.nachname) LIKE
> :fNachname )
>
>
> Does Alias dont work wir LEFT JOINS? Bug? Or did I something wrong?
>