Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The id attribute is used in the definition of the `update_time` column_property. Since id is inherited from a mixin, it is not available on the History class at mapping time. The `remote_side` and `foreign_keys` parameters of the relationship function face the same problem; however they can be defined as a callable, which defers resolving the identifiers they contain, which solves this problem. `column_property` does not accept a callable in place of its argument, so the only way around is to define it after the class has been defined - and we do so for several classes (see bottom of the model/__init__ module. However, it appears to be impossible to use this approach for the update_time attribute because it is also the name of the database table column, which is defined inside the class definition. Moving that column definition outside the class would add unnecessary complexity: redefining the id column, I think, is the reasonable approach here.
- Loading branch information