Hibernate Dynamic Update

xiaoxiao2021-03-06  42

Some people present Hibernate when the UPDATE persistent object, the resulting SQL statement is to all the properties all the set, which will cause Update operational efficiency. Hibernate is always static to generate SQL statements when initialization is initialized, so it is not possible to dynamically update. But Hibernate can also be configured to dynamically generate UPDATE and INSERT statements.

Name = "classname"

Table = "TableName"

Dynamic-update = "True | FALSE"

Dynamic-Insert = "True | FALSE"

/>

When set to TRUE, Hibernate generates a SQL statement in the runtime. For INSERT, only those properties that are not null are inserted, so they can support the DEFAULT property of the database field; for Update, only those modified Attributes.

转载请注明原文地址:https://www.9cbs.com/read-66565.html

New Post(0)