Hibernate中以Annotation方式动态更新字段

来源:互联网 发布:鲱鱼罐头搞笑淘宝评论 编辑:程序博客网 时间:2024/06/12 13:13

JPA  Annotation的Entity里面没有提供,使用Hibernate的Entity即可。

 

 

 

 

 

hibernate-distribution-3.6.0.Final下测试通过

 

同理动态插入时dynamicInsert = true即可。

 

 

 

Hibernate文档里有写:

 

Hibernate goes beyond the JPA specification and provide additional configurations. Some of them are hosted on @org.hibernate.annotations.Entity.

 

另外也特别提醒了

 

Although these settings can increase performance in some cases, they can actually decrease performance in others.

原创粉丝点击