Seems that way. Careful testing will as always confirm the methodology
and implementation.
On 09/26/2016 06:29 PM, HP3 wrote:
Thank you!
So, the following is all true?
Recap'ing the solution (Jason's and yours combined):
1- On `after_flush`, call `history_meta.create_version()` for each
object that is changing so its `XYZHistory` instance is created and
can be stored within `session.info <http://session.info/>`.
2. On `before_commit`, do `session.add()` for each history instance
(`XYZHistory`) in `session.info <http://session.info/>` and increase
`version` of each object associated to each history instance.
3. On `after_transaction_end`, if `transaction.parent` is `None`,
clean up `session.info <http://session.info/>`.
True?
And, even if there was a `session rollback` and/or `soft rollback`,
the `session.info <http://session.info/>` would have been cleaned up
by step 3. True?
--
You received this message because you are subscribed to the Google
Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sqlalchemy+unsubscr...@googlegroups.com
<mailto:sqlalchemy+unsubscr...@googlegroups.com>.
To post to this group, send email to sqlalchemy@googlegroups.com
<mailto:sqlalchemy@googlegroups.com>.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.