On Jul 6, 2008, at 1:16 AM, Empty wrote:

>
> You might want to look into the new instrument_declarative function in
> 0.5.  It allows you to wrap a class with the declarative functionality
> without using the metaclass.  This should permit you to work with a
> subclass, although I haven't tried it.
>

it also accepts "cls" as a keyword argument which is used as the base  
class:

        Base = declarative_base(..., cls=MyMixin)

you can also add a mixin to any class in Python like:

        Base = declarative_base(...)

        MyBase = type("MyBase", (Base, MyMixin), {})



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

Reply via email to