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

通用Mapp支持达梦数据库么? #871

Open
anyanyna opened this issue Oct 18, 2022 · 2 comments
Open

通用Mapp支持达梦数据库么? #871

anyanyna opened this issue Oct 18, 2022 · 2 comments

Comments

@anyanyna
Copy link

我现在用的版本是1.1.5版本,insert方法的sql会对自增主键ID进行赋值,导致在达梦数据库报错。
达梦数据库insert、update不支持对自增ID进行任何赋值操作

@abel533
Copy link
Owner

abel533 commented Oct 18, 2022

有 sqlserver 版本的批量插入方法,这个方法不会设置id。

tk.mybatis.mapper.common.sqlserver.InsertMapper;
tk.mybatis.mapper.common.sqlserver.InsertSelectiveMapper;

public interface SqlServerMapper<T> extends

@anyanyna
Copy link
Author

有 sqlserver 版本的批量插入方法,这个方法不会设置id。

tk.mybatis.mapper.common.sqlserver.InsertMapper; tk.mybatis.mapper.common.sqlserver.InsertSelectiveMapper;

public interface SqlServerMapper<T> extends

多谢大佬的建议。
我现在是在ID字段上加上如下两个注解来解决了:
@GeneratedValue(generator= "JDBC")
@column(insertable = false, updatable = false)

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

No branches or pull requests

2 participants