On Jun 5, 2010, at 11:56 PM, avdd wrote: > Is there a reason for preventing updates to the polymorphic_on column? > > I tried removing that branch (mapper.py:1628) and the mapper tests all > pass. (although there are problems with other tests that are > unaffected by this change)
The class of the object doesn't change, so an ORM update of that column would lead to inconsistent results. Such as if you attempted to refresh the object after it was expired. There aren't likely any tests which exercise actually changing the value through the ORM but I'm pretty sure it would cause errors. to change the class of an object mapped with inheritance, you need to issue the SQL directly, deleting from those tables that no longer apply and inserting into those which now do, then load the object clean. The operation isn't supported internally right now. -- 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.
