Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Jooq生成缺少POJO注释的POJO_Java_Sql_Jooq - Fatal编程技术网

Java Jooq生成缺少POJO注释的POJO

Java Jooq生成缺少POJO注释的POJO,java,sql,jooq,Java,Sql,Jooq,例如 SQL: 得到的POJO如下所示 /** * collect */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.9.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class

例如

SQL:

得到的POJO如下所示

/**
 * collect
 */
@Generated(
    value = {
        "http://www.jooq.org",
        "jOOQ version:3.9.2"
    },
    comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Collect implements Serializable {

    private Integer       travelId; 
    private String        description;
    private LocalDateTime creatTime;

    ...
}
我想要的POJO应该是这样的

例如:

我的代码生成器:

.withPojos(true)
.withDaos(true)
.withSpringAnnotations(true)
.withJavaTimeTypes(true)
POJO字段没有相应的注释。 我该怎么办?

目前(从jOOQ 3.9和3.10开始),注释只在表和记录上生成,而不是在POJO上生成。这是一个缺失的特性,应该在未来的jOOQ版本中实现。我已为此创建了一个功能请求:

您可以覆盖jooq codegen中的
JavaGenerator
类,以便手动生成这些注释,例如通过覆盖
JavaGenerator.generatePojo()

private Integer       travelId //trave_lId 
/* trave_lId */
private Integer       travelId 
.withPojos(true)
.withDaos(true)
.withSpringAnnotations(true)
.withJavaTimeTypes(true)