On Tue, Mar 10, 2009 at 11:59:33PM -0700, Daniel Fetchinson wrote:
> class comment( SQLObject ):
> object_id = Int( ) # this is the 'id' of the object this comment
> is associated to
> object_ = StringCol( validator=OneOf( [ 'animal', 'cage', 'zoo' ]
> ) ) # type of object
> content = UnicodeCol( ) # the actual comment
>
> select all comments that belong either to this zoo instance or to
> any cage in this zoo or any animal that is in a cage in the zoo?
With such a setup the only way I can see is to issue a complex UNION
query that unions 3 different queries - SELECT comments for zoo, cages and
animals.
UNION queries are, of course, impossible with SQLObject tables but
possible with SQLBuilder.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [email protected]
Programmers don't die, they just GOSUB without RETURN.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss