On Thu, Feb 07, 2008 at 11:06:05AM -0600, Christopher Singley wrote:
> class Object(SQLObject):
> states = MultipleJoin(class.__name__+'State', joinColumn='parent_id')
>
> Which leads to some questions:
> 1) How do I access the name of the class in the class definition?
No way. This is Python's limitation. You can access the class in its
metaclass, but please be careful - SQLObject already uses metaclasses.
> 2) If I can set these parent/states attributes like this, will it inherit
> correctly for subclasses?
No.
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss