How to fix HSQL DataSource + TxM where identity always return 0

筅森魡賤 提交于 2019-12-06 11:24:38

The answer is the DataSource should be tx aware, so that connections are sticky for each new tx. The original problem was a different connection was used to fetch the identity of the new row which of course resulted in 0 being returned. If the connection remained sticky for the initial insert and call identity then everything works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!