Annotation Interface DBRef


@Documented @Retention(RUNTIME) @Target(FIELD) public @interface DBRef
An annotation that indicates the annotated field is to be stored using a DBRef.
Author:
Jon Brisbin, Oliver Gierke, Thomas Darimont
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The database the referred entity resides in.
    boolean
    Controls whether the referenced entity should be loaded lazily.
  • Element Details

    • db

      String db
      The database the referred entity resides in.
      Returns:
      empty String by default.
      Default:
      ""
    • lazy

      boolean lazy
      Controls whether the referenced entity should be loaded lazily. This defaults to false.
      Returns:
      false by default.
      Default:
      false