> Hi Daniel
> Hi Oleg,
>
> I don´t know how to realize this with union but i think this should do it
>
>
> # plain sql would be sth like this (untested)
> select * from comment
> where (object='zoo' and object_id=?)
> or (object='cage' and object_id in (select id from cage where zoo=?))
> or (objec
Hi Daniel
Hi Oleg,
I don´t know how to realize this with union but i think this should do it
# plain sql would be sth like this (untested)
select * from comment
where (object='zoo' and object_id=?)
or (object='cage' and object_id in (select id from cage where zoo=?))
or (object='animal' and obje
On Wed, Mar 11, 2009 at 06:52:17PM -0700, Daniel Fetchinson wrote:
> 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 :)
If you manage to get it right please come back anyway and show us an
e
>> 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 t
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 = U