On Mon, Nov 27, 2006 at 05:38:09PM +0100, Diez B. Roggisch wrote:
> 1) I'd like to have a kind of multiple inheritance like it is available with 
> mixins. What I mean by this is something along these lines:
> 
> class Auditable(...):
>     created = DateTimeCol(notNone=True)
> 
> class SomeThing(SQLObject, Auditable):
>     foo = StringCol()
> 
> 
> And I now would like to see created being a column of SomeThing

   This should work as expected:

class Auditable(SQLObject):
    created = DateTimeCol(notNone=True)

class Deletable(SQLObject):
    deleted = DateTimeCol(notNone=True)

class SomeThing(Auditable, Deletable):
    foo = StringCol()

   What InheritableSQLObject does: it stores "created" and "deleted" in
their own tables (classes). Simple SQLObject stores these attributes in
SomeThing.
   No, InheritableSQLObject does not support multiple inheritance, and
probably never will.

> 2) The docs about _init are unclear to me, and somehow I didn't make things 
> work properly. What I'm after is a way to have a co-object that shares the 
> life-cycle of my original object. In my case, it is  a special User that has 
> a special Item associated with it.

   I do not understand the question. Can you say this in a (pseudo-)code?

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to