> On Wed, Jun 27, 2007 at 03:04:26PM +0200, [EMAIL PROTECTED] wrote:
> > SELECT object.id FROM object
> > LEFT JOIN attribute attr1 ON ((object.id) = (attr1.object_id)), object
> > LEFT JOIN attribute attr2 ON ((object.id) = (attr2.object_id))
> > WHERE (((attr1.value) > (2.0)) AND ((attr2.value) < (5.0)))
> >
> > As you can see, there is a second ", object" before the second join.
Why is
> > that? If I can tell correctly, this one is superfluous, right? Am I
doing
> > something wrong (e.g. is it even allowed to pass a list of joins to
join?)
> > or how can I do this correctly?
>
> The first parameter to a JOIN() can be None to avoid superfluous
table:
>
> join = [ LEFTJOINOn(Object, attr1, Object.q.id == attr1.q.objectID)
> , LEFTJOINOn(None, attr2, Object.q.id == attr2.q.objectID)
> ]
>
> Oleg.
:-) Easy enough, thanks a lot!
Bernhard
___________________________________________________________________
Disclaimer:
Diese Mitteilung ist nur fuer die Empfaengerin / den Empfaenger bestimmt.
Fuer den Fall, dass sie von nichtberechtigten Personen empfangen wird,
bitten wir diese hoeflich, die Mitteilung an die ZKB zurueckzusenden und
anschliessend die Mitteilung mit allen Anhaengen sowie allfaellige Kopien
zu vernichten bzw. zu loeschen. Der Gebrauch der Information ist verboten.
This message is intended only for the named recipient and may contain
confidential or privileged information.
If you have received it in error, please advise the sender by return e-mail
and delete this message and any attachments. Any unauthorised use or
dissemination of this information is strictly prohibited.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss