Package org.hibernate.annotations

Annotation Type DynamicUpdate


  • @Target(TYPE)@Retention(RUNTIME)public @interfaceDynamicUpdate
    Specifies that SQLupdate statements for the annotated entity are generated dynamically, and only include columns which are actually being updated.

    This might result in improved performance if it is common to change only some of the attributes of the entity. However, there is a cost associated with generating the SQL at runtime.

    When detached entities are reattached usingSession.update(Object), the entity must also be annotatedSelectBeforeUpdate for this annotation to have any effect.

    See Also:
    SelectBeforeUpdate
    • Optional Element Summary

      Optional Elements 
      Modifier and TypeOptional ElementDescription
      booleanvalue
      Deprecated.
      Whenfalse, this annotation has no effect.
    • Element Detail

      • value

        @Deprecated(since="6.0")boolean value
        Deprecated.
        Whenfalse, this annotation has no effect.
        Default:
        true