geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: ejbQL with relations
Date Sat, 08 Jul 2006 13:39:50 GMT
My guess would be that r.partei refers to a single entity (as in a
1-to-1 relationship between r and p) but the "in" operator expects its
argument to be a group or set (as in a 1-to-many) relationship.  Does
that sound right?

Thanks,
    Aaron

On 7/7/06, D. Strauss <geronimo@ds-2.de> wrote:
> Hello, ejbQL profs ^^
>
> seems that I missunderstood my ejbQL knowledge. I setup some ejbs and
> wanted to create some finder methods (ejb-jar.xml). Unfortunately,
> Geronimo (or OpenEJB?) ends in an exception that I can't figure out what
> it wants to tell me.
>
>
>
> Caused by: org.tranql.ql.QueryException: Finder [Finder
> method=[findAll]; EJB-QL=[select distinct object(r) from Rasse as r, in
> (r.partei) as p order by p.parteiName asc,r.rassenName asc]]
>         at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:143)
>         at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinders(EJBQLToPhysicalQuery.java:90)
>         ... 36 more
> Caused by: org.tranql.ql.QueryException: Parser, lexer or Tree-walker
> exception
>         at
> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:235)
>         at
> org.tranql.sql.EJBQLToPhysicalQuery.buildFinder(EJBQLToPhysicalQuery.java:130)
>         ... 37 more
> Caused by: org.tranql.ql.MalformedNodeException: Path used must end with
> a multi valued CMR field
>         at org.tranql.ql.DerivedTable.getEntityType(DerivedTable.java:61)
>         at org.tranql.ql.DerivedTable.<init>(DerivedTable.java:36)
>         at
> org.tranql.ejb.parser.EJBQL21Compiler.collection_member_declaration(EJBQL21Compiler.java:473)
>         at
> org.tranql.ejb.parser.EJBQL21Compiler.from_clause(EJBQL21Compiler.java:201)
>         at
> org.tranql.ejb.parser.EJBQL21Compiler.ejbql(EJBQL21Compiler.java:115)
>         at
> org.tranql.sql.EJBQLToPhysicalQuery.getEJBQLQuery(EJBQLToPhysicalQuery.java:233)
>         ... 38 more
>
>
> So, basically, the ejbQL
>         select distinct object(r) from Rasse as r, in (r.partei) as p order by
> p.parteiName asc,r.rassenName asc
> is wrong. However, the ejbQL
>         select distinct object(r) from Rasse as r order by r.rassenName asc
> works.
>
> Does anyone know what "Path used must end with a multi valued CMR field"
> mean?
>
> Or is this somehow related to the prefetch system by Geronimo?
>
> Best regards
>
> Dirk
>

Mime
View raw message