Re: Axiom queries - dereferencing references
Robert Gravina <[email protected]> Thu, 14 Sep 2006 18:40:10 +0900
| Newsgroups | gmane.comp.python.quotient.dev |
|---|---|
| Message-ID | <[email protected]> |
Ah I'm sorry.. I asked a similar question before and Glyph provided a
great explanation of how to do a join like this:
You can definitely do joins between item types in SQL code. It looks
like this:
store.query(A, AND(A.b == B.storeID, B.c == 7))
That gets all As whose 'b' attribute refers to a B which has a 'c'
attribute of 7.
On 2006/09/14, at 18:30, Robert Gravina wrote:
> I'd like to do a query of based on the attribute of one of the
> references on an object, i.e. something like:
>
> store.query(MyItem, MyItem.someReference.someOtherReference ==
> someItemInstance)
>
> ... and to make this more understandable, a possible scenario would
> be:
>
> store.query(Book, Book.authour.manager == fred)
>
> I've noticed this doesn't work, but is there another way to achieve
> this with Axiom queries?
>
> Thanks,
>
> Robert
>
> _______________________________________________
> Divmod-dev mailing list
> [email protected]
> http://divmod.org/users/mailman.twistd/listinfo/divmod-dev