>> 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.
Thanks Oleg, I'll look at SQLBuilder. Unfortunately I haven't found working examples of SQLBuilder + UNION constructions so far, if I don't manage to get it right I'll probably come back :) Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown ------------------------------------------------------------------------------ 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 sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss