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
{{ message }}
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
What's the recommend way to use transactions? #541
👋 I've searched around the code base. It seems the transaction support is removed from hanami model. Hanami::Model.container.gateways[:default].connection seems to be a Sequel::Mysql2::Database which I could call transaction on it. May I ask if there is a recommended way to do it in hanami model? Thanks!
Reacted by ippachi, Sergei Andronov, Leonardo Gomes, Jerome Paul and Monica Olinescu
Activity
marfoldi commentedon Apr 30, 2021
👋
monicao commentedon Dec 30, 2021
Thanks @marfoldi . How about if you need to write records to two or more separate tables in a transaction?
For example, you have some
Userdata and someUserAddressdata that needs to be persisted in an atomic way.marfoldi commentedon Jan 2, 2022
Maybe something like: