JPA@Entry抛出未能确定推荐的 JDBC 类型用于 Java 类型
发布时间
阅读量:
阅读量
问题很明显,无法自动决定类型,那就手动告诉该字段。
一、直接上解决方案
如果是一对一的关系用 @OneToOne
如果是一对多的关系用 @OneToMany
如果是多对一的关系用 @ManyToOne
二、另一个无空构造函数的问题
在注解操作中,在进行某些功能时会遇到运行时错误:找不到空类型的构造函数。由于导入了错误的包模块,请重新配置导入路径即可解决问题。
The following functions cannot be invoked with the arguments provided:
public constructor OneToOne(buildingContext: MetadataBuildingContext!, table: Table!, owner: PersistentClass!) declared in org.hibernate.mapping.OneToOne
private constructor OneToOne(original instance of OneToOne!) declared in org.hibernate.mapping.OneToOnekotlin(NONE_APPLICABLE)

还没有任何评论哟~
