Chris Withers wrote:
>> But agreed, make your mixin implement a marker class from the
>> declarative
>> module (MixinsDeclarative, i dunno),
>
> How about just a marker attribute? How about something in
> __mapper__args__, which already exists?
>
> class MyMixin:
>
> __mapper_args__ = {'abstract':True}
well mapper_args is args that go to the mapper. Its a little unclean
IMHO to reuse that same dict for declarative purposes. Id rather have
another attribute like __declarative_abstract__ = True or something like
that (ideas welcome).
>
> I assume this is a feature waiting to be implemented?
>
> What to do in the meantime? The class decorator felt really quite neat
> except that it won't work where primary key columns are added by the
> decorator, right?
yeah the class decorator can't really handle the PKs. the mapper wants
those when it starts up. as far as implementation this feature isn't on
my personal radar, so if you really want anytime soon you should provide a
patch, which I can of course help with.
>
> Chris
>
> --
> Simplistix - Content Management, Batch Processing & Python Consulting
> - http://www.simplistix.co.uk
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.