Description
Hello, I am very glad to come across such an excellent Rust web template project; it's really great. While reading the code, I have a question that needs discussion. In the new_with_txn method within the ModelManager
, should there be an additional check to see if a transaction is already active in the current self? If so, there would be no need to start a new transaction. This approach ensures that during the transaction propagation, each piece of transactional code remains an independent segment. If ModelManager
does not have an ongoing transaction
, then one should be started; if a transaction already exists, the current MM
should just be used directly. This not only simplifies the coding process but also guarantees the consistency of transactions. I wonder if my understanding is reasonable.