No Dialect mapping for JDBC type: 2003

前端 未结 2 512
遇见更好的自我
遇见更好的自我 2021-01-13 06:05

Though there are some question exists with this title , but my query does not solve from those thread.

I am executing recursive (using with clause) query through hib

2条回答
  •  花落未央
    2021-01-13 06:37

    Use a package 'com.vladmihalcea:hibernate-types-52:2.8.0' or add your database dialect to yml file in resources:

    @Entity
    @TypeDefs({
            @TypeDef(name = "string-array", typeClass = StringArrayType.class),
            @TypeDef(name = "json", typeClass = JsonStringType.class),
            @TypeDef(name = "jsonb", typeClass = JsonBinaryType.class)
    })
    public class Post implements Serializable {
    
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private Long id;
    
        @Type(type = "string-array")
        @Column(columnDefinition = "text[]")
        private String[] tags;
    

提交回复
热议问题