|
Spring Data Neo4j | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
public @interface RelatedTo
Annotation for NodeEntity fields that relate to other entities via
relationships. Works for one-to-one and one-to-many relationships. It is optionally possible to define the relationship type,
relationship direction and target class (required for one-many-relationships).
Collection based one-to-many relationships return managed collections that reflect addition and removal to the underlying relationships.
Examples:
@RelatedTo(elementClass=Person.class) Collection<Person> friends; @RelatedTo(type="partner") Person spouse;
| Optional Element Summary | |
|---|---|
org.neo4j.graphdb.Direction |
direction
|
Class<?> |
elementClass
|
boolean |
enforceTargetType
Used to discriminate between relationships with the same type based on end node type |
String |
type
|
public abstract String type
public abstract org.neo4j.graphdb.Direction direction
public abstract Class<?> elementClass
public abstract boolean enforceTargetType
|
Spring Data Neo4j | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||