I was surprised when I recently discovered I had to add an extra
underscore to use a SQLObject class's foreign key ID when using
sqlobject.sqlbuilder.Outer. For example, this works:

EXISTS(Select(Foo.q.id, where=Outer(Bar).q.foo_ID == Foo.q.id))

This does not work:

EXISTS(Select(Foo.q.id, where=AND(Outer(Bar).q.fooID == Foo.q.id)))

I've posted an example as a Gist here:

https://gist.github.com/RhubarbSin/5785040

(That code doesn't represent the way I would normally perform a query;
I encountered the issue in a subquery of a much larger one.)

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to