RE: double inner join

From: Dave Merrin (dmerri..pasystems.co.uk)
Date: Fri Oct 07 2005 - 04:50:39 EDT

  • Next message: Andrus Adamchik: "Re: SQL Function execution using Cayenne"

    that sounds like it might be possible. Is it possible to create a new
    mapping based on an existing mapping on the fly (i.e. in code). How do I
    then go about using the new mapping to query the database?

    I've had a quick look through the ObjEntity class but I'm not sure how to
    run a query using it.

    Cheers,

    Dave

    > -----Original Message-----
    > From: Cris Daniluk [mailto:cris.danilu..mail.com]
    > Sent: 06 October 2005 19:53
    > To: cayenne-use..bjectstyle.org
    > Subject: Re: double inner join
    >
    >
    > I thought I saw a post a while back about someone doing this by
    > creating another ObjEntity ref to the table or something like that?
    >
    > I could be smoking crack...
    >
    > Cris
    >
    > On 10/6/05, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > > There was a proposal to add that, but it has never materialized into
    > > code (maybe someday)
    > >
    > > http://www.objectstyle.org/cayenne/lists/cayenne-devel/2003/09/0096.html
    > >
    > > So I guess for now SQLTemplate is the only way.
    > >
    > > Andrus
    > >
    > >
    > > On Oct 6, 2005, at 12:47 PM, Dave Merrin wrote:
    > >
    > > > i'd like to accomplish something like this using Expresssions:
    > > >
    > > > from Cat cat
    > > > inner join cat.kittens as kittens0
    > > > inner join cat.kittens as kittens1
    > > > where kittens0.name = 'Fred'
    > > > and kittens1.name = 'Amy'
    > > >
    > > > which would find cats that have at least two kittens, one named
    > > > fred and
    > > > another amy.
    > > >
    > > > How do I do this using Expressions?
    > > >
    > > > Cheers,
    > > >
    > > > Dave
    > > >
    > > >
    > >
    > >
    >



    This archive was generated by hypermail 2.0.0 : Fri Oct 07 2005 - 04:51:22 EDT