>    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()

Will give it a shot, thanks.

>    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.

I'm fine with that.

> > 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?

Basically, I want this:

class User(SQLObjec):
     ...

     def _init(self, *args, **kwargs):
           if <the_table_row_is_created>:
                 co_object = CoObject(userID=self.id)
           return super(User, self)._init(*args, **kwargs)

This will ensure there is a CoObject whenever there is a User.

Did this clear things up for you?

-- 
>> Diez B. Roggisch
>> Developer

T  +49 (30) 443 50 99 - 27
F  +49 (30) 443 50 99 - 99
M  +49 (179) 11 75 303
E  [EMAIL PROTECTED]


>> artnology GmbH

A  Milastraße 4 / D-10437 Berlin
T  +49 (30) 443 50 99 - 0
F  +49 (30) 443 50 99 - 99
E  [EMAIL PROTECTED]
I  http://www.artnology.com

-------------------------------------------------------------------------
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