Tomasz Jezierski - Tefnet wrote: > Awkward column_property is because of exception you'll get if try to set > Column without column_proprerty around it: > --- > sqlalchemy.exc.ArgumentError: Column 'PhysObject.locationId' is not > represented in mapper's table. Use the `column_property()` function to > force this column to be mapped as a read-only attribute. > --- > > which (I think) exposes a real problem (Column 'PhysObject.locationId' > is not represented in mapper's table.). > > Thats why we try to execute Mapper._configure_inheritance() again, > because mapped_table is not updated after adding new column/property to > already compiled mapper
OK what happens here is that the mapper for PhysObject is mapped to the table "tefobject JOIN physobject". So adding the locationID column to physobject after the fact fails to add it to an already compiled JOIN object. Even if I modify that part of the mapping to check against "local_table" as well, the whole mapped table has to be re-established. I think what's called for here is an error message detecting a condition bywhich the mapped column cannot be added. The workaround suggested by the message is *not* appropriate here. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---