自动增量的 jooq @NotNull 验证
jooq @NotNull validation for AutoIncrement
我在 Spring 中使用 JOOQ。我有 table 这样的:
CREATE TABLE city (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `id_UNIQUE` (`id` ASC))
ENGINE = InnoDB;
由此 table JOOQ 生成
@NotNull
public UInteger getId() {
return this.id;
}
这将导致 Javax 验证失败@Valid。
有google组Link and it was said it was fixed Link。
我正在使用 JOOQ 3.9.1。
我做错了什么吗?
确实,修复 #5128(您已链接)似乎仅适用于将标识列报告为默认列到 jOOQ-meta 的那些数据库。
需要一个额外的修复来排除 "non-defaulted" 标识列生成此注释:
https://github.com/jOOQ/jOOQ/issues/6401
我在 Spring 中使用 JOOQ。我有 table 这样的:
CREATE TABLE city (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `id_UNIQUE` (`id` ASC))
ENGINE = InnoDB;
由此 table JOOQ 生成
@NotNull
public UInteger getId() {
return this.id;
}
这将导致 Javax 验证失败@Valid。
有google组Link and it was said it was fixed Link。
我正在使用 JOOQ 3.9.1。
我做错了什么吗?
确实,修复 #5128(您已链接)似乎仅适用于将标识列报告为默认列到 jOOQ-meta 的那些数据库。
需要一个额外的修复来排除 "non-defaulted" 标识列生成此注释: https://github.com/jOOQ/jOOQ/issues/6401