Relation options
[Relation(
Id = "9f4e2c11-77a3-4d5e-8b21-0c6f9a3e7d54", // a stable id that survives renames
DisallowCircularReferences = true // no cycles in a relation of a type to itself
)]
public class VenueTree : OneToMany<IVenue, IVenue> {
public class Parent : One { }
public class Children : Many { }
}[Relation] also takes SourceTypes and TargetTypes, but the generic parameters already say that.
[RelationProperty] on an end can put the related nodes into this node's text index, so a venue is
found by the names of its events, and makes the relation a facet:
[RelationProperty(
TextIndexRelatedDisplayName = true, // index the related nodes' names
TextIndexRelatedContent = false, // true indexes their text as well
TextIndexRecursiveLevelLimit = 1, // how far related content is followed
Facet = true)] // facets are opt-in for relations
EventsAtVenue.Events Events { get; }