class OneRelationshipDefinition(property: KProperty1<*, *>, type: String, direction: Direction, parentKClass: KClass<out Node>, allowedAuthorizations: Set<String>) : RelationshipDefinition

Defines the one side of a one-to-one or many-to-one relationship between two Nodes

Parameters

property

the property on the class which defines the relationship

type

the type of the relation (label associated with Neo4j relationship)

direction

direction of the relation (direction associated with Neo4j relationship)

parentKClass

the class associated with the NodeDefinition this is used as part of, must be a subclass of the property defining class

allowedAuthorizations

the names of authorizations which allow via this relation. These names result in properties with value true on the relation

Constructors

Link copied to clipboard
constructor(property: KProperty1<*, *>, type: String, direction: Direction, parentKClass: KClass<out Node>, allowedAuthorizations: Set<String>)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Whether the property is nullable in the database Does NOT consider the GraphQLNullable annotation

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val property: KProperty1<*, *>
Link copied to clipboard

optional setter which is used to initialize the opposite property may only be present if the opposite side is a one side

Link copied to clipboard

Functions

Link copied to clipboard
fun <T : RelationshipPattern, ExposesPatternLengthAccessors<*>> generateRelationship(rootNode: ExposesRelationships<T>, propertyNode: Node): T

Generates a Cypher-DSL RelationshipPattern

Link copied to clipboard

Creates the remote property setter. Checks all properties on the remote node, and returns the first where

Link copied to clipboard

Gets related nodes defined by this property, but only those already loaded (therefore no lazy loading) The relationships do not have to be persisted yet

Link copied to clipboard

Gets related nodes to save

Link copied to clipboard

Gets the diff describing updates of the property

Link copied to clipboard
internal fun validate(node: Node, savingNodes: Set<Node>, nodeDefinitionCollection: NodeDefinitionCollection)

Validates the relationship for Node by calling Node