Annotation Interface Reference


@Documented @Inherited @Retention(RUNTIME) @Target({FIELD,METHOD}) @Handler(dev.morphia.mapping.codec.references.ReferenceCodec.class) public @interface Reference
Author:
Olafur Gauti Gudmundsson, Scott Hernandez
  • Element Details

    • idOnly

      boolean idOnly
      Returns:
      whether only _id should be stored versus storing a DBRef
      Default:
      false
    • ignoreMissing

      boolean ignoreMissing
      Returns:
      if true, Ignore any reference that don't resolve (aren't in mongodb)
      Default:
      false
    • lazy

      boolean lazy
      Returns:
      if true, Create a proxy around the reference which will be resolved on the first method call.
      Default:
      false
    • value

      String value
      Returns:
      The name of the Mongo value to store the field. Defaults to the name of the field being annotated.
      Default:
      "."