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

sqlite 保存的时候获取数据库增ID报错 #6032

Open
cktk opened this issue Apr 1, 2024 · 1 comment
Open

sqlite 保存的时候获取数据库增ID报错 #6032

cktk opened this issue Apr 1, 2024 · 1 comment
Labels

Comments

@cktk
Copy link
Contributor

cktk commented Apr 1, 2024

当前使用版本(必填,否则不予处理)

3.5.5

该问题是如何引起的?(确定最新版也有问题再提!!!)

引入 sqlite 最新版本的依赖 保存数据的时候报错 报错原因是获取生成的主键错误
这个版本可以正常的sav数据 并获取到自增主键ID
可用版本

       <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>3.42.0.1</version>
        </dependency>

最新版本

<dependency>
    <groupId>org.xerial</groupId>
    <artifactId>sqlite-jdbc</artifactId>
    <version>3.45.2.0</version>
</dependency>

在最新版本的sqlite-jdbc中无法获取数据库自增ID

重现步骤(如果有就写完整)

3.43.0.0 的发布日志
🚨 删除了对 Statement#getGeneratedKeys 的支持:不再支持 getGeneratedKeys

参考地址

xerial/sqlite-jdbc#963

@miemieYaho
Copy link
Member

你是觉得我们能修改jdbc吗?

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

No branches or pull requests

3 participants