且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

让hibernate忽略未映射的类变量

更新时间:2022-10-15 12:25:25

JPA will use all properties of the class, unless you specifically mark them with @Transient:

@Transient
private String agencyName;

The @Column annotation is purely optional, and is there to let you override the auto-generated column name. Furthermore, the length attribute of @Column is only used when auto-generating table definitions, it has no effect on the runtime.

相关阅读

技术问答最新文章