On Mon, Oct 08, 2007 at 09:06:59PM +0200, Daniel Fetchinson wrote:
> question is if there was any way to select the number of animals from
> zoo 'myzoo' in the above example (using inheritance) with a single
> query. Apparently the above query is not gonna work but is there
> another way? Of course one can do several queries but that might hurt
> performance. If there is such a single query I'll continue using
> inheritance if there is none then I'll just design my models such that
> there is no inheritance at all.
If you don't need different classes from one .select() you probably
could go with simple *Python* inheritance:
class named( SQLObject ):
name = StringCol( )
class zoo( named ):
# name = StringCol( )
cages = MultipleJoin( 'cage' )
etc...
The column 'name' will be included in the every table.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss