修改pgsql兼容,在事务内,没有自增id返回时,因为sql报错,事务中止,不能提交,只能回滚#593
Open
qfz9527 wants to merge 1 commit intotop-think:3.0from
Open
修改pgsql兼容,在事务内,没有自增id返回时,因为sql报错,事务中止,不能提交,只能回滚#593qfz9527 wants to merge 1 commit intotop-think:3.0from
qfz9527 wants to merge 1 commit intotop-think:3.0from
Conversation
Author
|
#591 这个提出一种解决方式,但是没有解决完,如果表没有自增id时,因为调用lastInsertId报错,会导致事务回滚,在pgsql,里,事务里sql执行只要报错,抛出异常,不管是否捕获,事务就会终止,最好是可以通过配置关闭,框架内部sql执行 |
|
Model的save方法会要求返回lastInsertId,此种情况该pr未得到修复 |
Author
Member
|
建议如果要调整的 可以在具体驱动里面调整 |
Author
调整了,你看看 |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

https://stackoverflow.com/a/22743521