cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: How to use RelationshipQuery?
Date Fri, 13 Oct 2006 13:58:05 GMT
Hi Arturo,

Not quite sure what problem you are trying to solve, but I can  
comment on RelationshipQuery. RelationshipQuery is used by Cayenne  
internally to resolve relationships. Applications rarely create it  
directly, but there is no problem if you do:

http://cwiki.apache.org/CAYDOC/relationshipquery.html

Ignore the EntityResolver methods, as those are just callbacks that  
are invoked by Cayenne when the query is executed. Just for the  
reference, EntityResolver is a logical analog of EOF EOModelGroup -  
it provides a single combined namespace for mapping metadata and is  
accessible via ObjectContext|DataContext.getEntityResolver().

Andrus


On Oct 12, 2006, at 11:58 PM, Arturo PĂ©rez wrote:
> Hi all,
>
> I was trying to populate some Click CayenneForm things.  Coming  
> from an
> EOF world, I prefer to traverse relationships rather than run queries.
> But many (all?) of the Click Cayenne integrations require  
> SelectQuery to
> function.  In looking around for a way to bridge this divide, I  
> stumbled
> across the RelationshipQuery thing in Cayenne 1.2.  But I couldn't
> figure out how to use it.  What's an EntityResolver?  How do I get  
> one?
> How do I convert a RelationshipQuery into a SelectQuery?  Is this  
> even a
> sensible way to approach the problem?
>
> An example use of the RelationshipQuery or a better suggestion  
> would be
> much appreciated,
>
> tia,
> arturo
>
>


Mime
View raw message