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
@marksteward I was hoping to create a PR for this - if there is interest on your side
I can think of 2 approaches here:
Create a helper utils.parent_table() which uses the logic I wrote above
Change the current VersioningManager.association_tables -> VersioningManager.parent_association_table_map and VersioningManager.association_version_tables -> VersioningManager.version_association_table_map ?
I feel solution 2 is a bit better and more consistent with VersioningManager.version_class_mapVersioningManager.parent_class_map
The manager already exposes association_tables and association_version_tables, and sqlalchemy_continuum.utils.version_table() maps a table to its version table, so the reverse is a short lookup like the one you wrote. We're not adding more registry maps for now.
Activity
AbdealiLoKo commentedon Aug 22, 2022
Having a
parent_table()function would also be great.I have created something like this in my own projects:
AbdealiLoKo commentedon Aug 26, 2022
@marksteward I was hoping to create a PR for this - if there is interest on your side
I can think of 2 approaches here:
VersioningManager.association_tables->VersioningManager.parent_association_table_mapandVersioningManager.association_version_tables->VersioningManager.version_association_table_map?I feel solution 2 is a bit better and more consistent with
VersioningManager.version_class_mapVersioningManager.parent_class_mapWhat would you recommend ?
add sqlalchemy-continuum#286: add parent_table in utils
add sqlalchemy-continuum#286: add parent_table in utils
add sqlalchemy-continuum#286: add parent_table in utils
josecsotomorales commentedon Oct 15, 2026
The manager already exposes
association_tablesandassociation_version_tables, andsqlalchemy_continuum.utils.version_table()maps a table to its version table, so the reverse is a short lookup like the one you wrote. We're not adding more registry maps for now.