limscoder wrote:
>
> In 5.2 I was able to map a base-class, and sub-classes would
> automatically be persisted as the base type. In 5.3 I get an
> UnmappedInstanceError when trying to persist an object of the sub-
> class type. I didn't see anything about this change in the changelog.
> Is there a way to get the <5.3 behavior?


this behavior isn't supported since if you said:

class MySubClass(MyMappedClass):
    def __init__(self):
        self.foo = 'foo'

the class no longer has the proper instrumentation on the __init__ method.

the solution is to map your subclass.   this is automatic if you use
declarative.  in any case, no table is needed:

mapper(MySubClass, inherits=MyMappedClass)




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