Hi all,
I'm having two simple questions here:
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
I could of course go with a InheritableSQLObject for this simple case - but
first of all I don't want to have all the joins that produces, and second
there might be cases where I could need another aspect, like e.g. Deletable
that marks objects as deleted (without actually deleting them)
Is there anything like this possible - apart from re-iterating all the columns
in each class?
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.
Now I can overload destroySelf to get rid of the co-item in case of delete,
but I didn't manage to distinguish update/insert in case of object creation -
so that in the latter case, I'd be able to create the co-object. I helped
myself with a classmethod, but for the sake of beauty I'd actually prefer a
constructor-based approach if possible.
Any hints welcome.
--
>> 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