Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改pgsql兼容,在事务内,没有自增id返回时,因为sql报错,事务中止,不能提交,只能回滚 #593

Open
wants to merge 1 commit into
base: 3.0
Choose a base branch
from

Conversation

qfz9527
Copy link

@qfz9527 qfz9527 commented Jul 25, 2024

@qfz9527 qfz9527 closed this Jul 25, 2024
@qfz9527 qfz9527 reopened this Jul 25, 2024
@qfz9527
Copy link
Author

qfz9527 commented Jul 25, 2024

#591 这个提出一种解决方式,但是没有解决完,如果表没有自增id时,因为调用lastInsertId报错,会导致事务回滚,在pgsql,里,事务里sql执行只要报错,抛出异常,不管是否捕获,事务就会终止,最好是可以通过配置关闭,框架内部sql执行

@ZhouSiliang
Copy link

Model的save方法会要求返回lastInsertId,此种情况该pr未得到修复

@qfz9527
Copy link
Author

qfz9527 commented Jul 26, 2024

Model的save方法会要求返回lastInsertId,此种情况该pr未得到修复

这样有没有问题,
image

@liu21st
Copy link
Member

liu21st commented Jul 29, 2024

建议如果要调整的 可以在具体驱动里面调整

@qfz9527
Copy link
Author

qfz9527 commented Jul 29, 2024

建议如果要调整的可以在具体驱动里面调整

调整了,你看看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants