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
@camsaul
We found when call db/transaction with a binding db-connection, it will never work, since the
connection function will always return db-connection. What I suggest is to adjust the priority to move transaction-connection to the top. I do some testing in my local env, it works.
(defn connection []
(or transaction-connection ;;fix the bug move transaction to the top, otherwise transaction will not work. db-connection
@default-db-connection
(throw (Exception. "DB is not set up. Make sure to call set-default-db-connection! or bind db-connection.")))))))
The text was updated successfully, but these errors were encountered:
jiegao1977
changed the title
Do not use Transaction when call db/insert with a *db-connection*
Will not use Transaction when call db/insert with a binding to *db-connection*
May 5, 2021
@camsaul
We found when call db/transaction with a binding db-connection, it will never work, since the
connection function will always return db-connection. What I suggest is to adjust the priority to move transaction-connection to the top. I do some testing in my local env, it works.
(defn connection []
(or transaction-connection ;;fix the bug move transaction to the top, otherwise transaction will not work.
db-connection
@default-db-connection
(throw (Exception. "DB is not set up. Make sure to call set-default-db-connection! or bind db-connection.")))))))
The text was updated successfully, but these errors were encountered: