[sqlalchemy] Re: Declarative and common fields

2008-09-29 Thread az
i dont know if elixir has such 'attribute/behaviour injectors', i have DBCOOK_no_mapping=True in dbcook.sf.net that does that. the machinery behdin it is soewhat tricky (x in class.__dict__ and not in base_class.__dict__ etc stuff) u may try your stuff as mixin, that may or may not work. On

[sqlalchemy] Re: Declarative and common fields

2008-09-29 Thread Gaetan de Menten
On Mon, Sep 29, 2008 at 5:01 PM, Joril [EMAIL PROTECTED] wrote: Hi everyone! I'm new to SQLAlchemy and I'm using version 0.5rc1.. I need every entity class to have a few common fields, so I tried writing an abstract base class, declarative-style, that every other entity class would

[sqlalchemy] Re: Declarative and common fields

2008-09-29 Thread Joril
I don't know whether this is currently possible with Declarative or not. In the case it isn't, patching Declarative should be quite easy (but I don't know if such a patch would be accepted or not). I see.. I'll wait a bit then, maybe one of the developers will tell us if it'd be acceptable :)

[sqlalchemy] Re: Declarative and common fields

2008-09-29 Thread Michael Bayer
On Sep 29, 2008, at 11:01 AM, Joril wrote: Hi everyone! I'm new to SQLAlchemy and I'm using version 0.5rc1.. I need every entity class to have a few common fields, so I tried writing an abstract base class, declarative-style, that every other entity class would subclass. So for example: