Michael Bayer wrote:

> meta = MetaData()
> Base1 = declarative_base(metadata=meta, metaclass=MyMetaClass)
> Base2 = declarative_base(metadata=meta, metaclass=MyOtherMetaClass)
> Base2._decl_class_registry = Base1._decl_class_registry

Great!
So now I have a MetaClass2 that extends MetaClass1, and they share a
set of fields.. Works perfectly :)

Another question if I may.. What would be the recommended way to
identify a mapped object now? I mean, I could use something like
isinstance(obj, Base1) or isinstance(obj, Base2)
but is there a more concise way? It looks like Base1 and Base2 extend
object directly..

> This is a use case we can make easier in a future release.

That'd be appreciated, surely :)

Many thanks for your time, as always!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to