Package dev.morphia.annotations
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
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
boolean
boolean
-
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:
- "."
-