geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "D. Strauss" <geron...@ds-2.de>
Subject Re: ejbQL with relations
Date Sun, 09 Jul 2006 18:17:12 GMT
Hello, Aaron,

no :P

Actually, I have 1 partei (aka party) but a lot of other races (aka
rasse(n), german language, sorry). So it's a common 1:n relation. I hope
that I implemented it right into Geronimo but still for now there are no
problems.

However, I fixed the ejbQL bug temporarily by setting the finder method
prefetch mechanism from All to Default (aka: don't load any cmr fields
right now). It seems to work. Now I'm working on a JSP page that uses
this findAll() method.

Let's see ...

Best regards

Dirk

Aaron Mulder schrieb:
> 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