在Hibernate中设置更新和插入属性 [英] Setting update and insert property in Hibernate
问题描述
update =false
insert =false
它们的用途是什么?他们对表演有什么不同?何时使用它们?
/3.6/reference/en-US/html_single/#d0e6525rel =noreferrer>文档:
更新,insert(可选 - 默认为true):指定
映射列应该包含在SQL UPDATE和/或INSERT
语句中。将两者都设置为false允许一个纯粹的派生属性
,其值由映射到
相同列的某个其他属性或触发器或其他应用程序初始化。
In the hibernate HBM file, what is the purpose of setting the following properties?
update = "false"
insert = "false"
What purpose do they serve? What difference do they make to the performance? When should we use them?
From the documentation:
update, insert (optional - defaults to true): specifies that the mapped columns should be included in SQL UPDATE and/or INSERT statements. Setting both to false allows a pure "derived" property whose value is initialized from some other property that maps to the same column(s), or by a trigger or other application.
这篇关于在Hibernate中设置更新和插入属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!