Hi all.
I have seen in chapter 4.3.1 (Dynamic SQL generation) of the "bible" (Java Persistence with Hibernate) the attributes
dinamicInsert and
dinamicUpdate of @org.hibernate.annotations.Entity.
"The dynamic-insert attribute tells Hibernate whether to include null property values in an SQL INSERT, and the dynamic-update attribute tells Hibernate whether to include unmodified properties in the SQL UPDATE"
My question is: anybody know a disadvantage of setting true these attributes in
any mapped entities?
I mean, is there any situation in which any of these attributes should be false?
Code example:
Code:
@Entity
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
//see 4.3.1 Dynamic SQL generation (page 172)
@Table(name = "table_name", schema = "schema_name")
public class Pojo implements Serializable {
// mapped fields and accessors
}