Spring Data MongoDB - Core

org.springframework.data.mongodb.core.mapping
Annotation Type DBRef


@Documented
@Retention(value=RUNTIME)
@Target(value=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
 String db
          The database the referred entity resides in.
 boolean lazy
          Controls whether the referenced entity should be loaded lazily.
 

db

public abstract String db
The database the referred entity resides in.

Returns:
Default:
""

lazy

public abstract boolean lazy
Controls whether the referenced entity should be loaded lazily. This defaults to false.

Returns:
Default:
false

Spring Data MongoDB - Core

Copyright © 2011-2013-2014 Pivotal. All Rights Reserved.