Annotation Type DynamicUpdate


  • @Target(TYPE)
    @Retention(RUNTIME)
    public @interface DynamicUpdate
    Specifies that SQL update 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 using Session.update(Object), the entity must also be annotated SelectBeforeUpdate for this annotation to have any effect.

    See Also:
    SelectBeforeUpdate
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean value
      Deprecated.
      When false, this annotation has no effect.
    • Element Detail

      • value

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