You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a declared_attr is defined in a child class of a versioned model, the corresponding version model doesn't pick up the name of the attribute. Instead, it defaults to the column name.
As a result, when the changeset is assigned to the version model, the changes in the declared_attr are not stored.
I'm thinking of a fix that would change the build_model method to populate the version model with column_property based on the mapper of the original model. Would that make sense @kvesteri?
The text was updated successfully, but these errors were encountered:
killthekitten
added a commit
to killthekitten/sqlalchemy-continuum
that referenced
this issue
May 6, 2020
When a
declared_attr
is defined in a child class of a versioned model, the corresponding version model doesn't pick up the name of the attribute. Instead, it defaults to the column name.As a result, when the changeset is assigned to the version model, the changes in the
declared_attr
are not stored.Here's some pseudo-code to illustrate the issue:
This is what
Article.__mapper__._columntoproperty
looks like in this case:I'm thinking of a fix that would change the
build_model
method to populate the version model withcolumn_property
based on the mapper of the original model. Would that make sense @kvesteri?The text was updated successfully, but these errors were encountered: