Open AbdealiLoKo opened 2 years ago
After digging a bit deeper - I realized:
Book.__versioning_mapper__
can be used to access the manager.
When I try to do the same for book_author.__versioning_manager__
- it says the property does not exist.
Looks like ModelBuilder.__call__()
is adding the manager.
But TableBuilder.__call__()
is not adding the manager so there is no way to go from AssociationTable -> Manager as of now
I'm having this same issue, have been digging around for the last months but couldn't find anything about it.
Is there any workaround to get versioning manager for association tables? How could we replace "get_versioning_manager" for this case?
I'm querying into _version table but it's not a good solution because I can't filter by number of version.
Currently - I am able to get the versioning manager used for a Model using:
sqlalchemy_continuum.utils.get_versioning_manager()
But this does not work for Tables.
In most cases, I could use
sqlalchemy_utils.functions import get_mapper
to get the mapper of a table. But for association tables - I cannot do that as they do not have any Model associated with itExample application to try this with: