Delegate
This class can be used to implement delegated properties in Node classes. The most common use case is to have a property that is a list of Edge objects (for persistence) and a second (delegated) property that allows easy access just to the connected nodes of the individual edges for in-memory access. It should not be used directly, but rather by using unwrapping.
For example:
class MyNode {
@Relationship(value = "EXPRESSIONS", direction = "OUTGOING")
var expressionsEdges = astChildrenOf<Expression>()
var expressions by unwrapping(MyNode::expressionsEdges)
}
Content copied to clipboard
This class is intentionally marked with Transient, so that the delegated properties are not transferred to the Neo4J OGM. Only the property that contains the property edges should be persisted in the graph database.