Annotation Interface Update


Annotation to declare update operators directly on repository methods. Both attributes allow using a placeholder notation of ?0, ?1 and so on. The update will be applied to documents matching the either method name derived or annotated query, but not to any custom implementation methods.
Author:
Christoph Strobl
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Takes a MongoDB JSON string representation of an aggregation pipeline to define the update stages to be executed.
    Takes a MongoDB JSON string to define the actual update to be executed.
    Takes a MongoDB JSON string to define the actual update to be executed.
  • Element Details

    • value

      @AliasFor("update") String value
      Takes a MongoDB JSON string to define the actual update to be executed.
      Returns:
      the MongoDB JSON string representation of the update. Empty string by default.
      See Also:
      Default:
      ""
    • update

      @AliasFor("value") String update
      Takes a MongoDB JSON string to define the actual update to be executed.
      Returns:
      the MongoDB JSON string representation of the update. Empty string by default.
      See Also:
      Default:
      ""
    • pipeline

      String[] pipeline
      Takes a MongoDB JSON string representation of an aggregation pipeline to define the update stages to be executed.

      This allows to e.g. define update statement that can evaluate conditionals based on a field value, etc.

      Returns:
      the MongoDB JSON string representation of the update pipeline. Empty array by default.
      See Also:
      Default:
      {}