Back to Exposed

OptionalBackReference

docs/api/exposed-dao/org.jetbrains.exposed.v1.dao/-optional-back-reference/index.html

1.2.02.5 KB
Original Source

OptionalBackReference

class OptionalBackReference<ParentID : Any, out Parent : Entity<ParentID>, ChildID : Any, in Child : Entity<ChildID>, REF>(reference: Column<REF?>, factory: EntityClass<ParentID, Parent>, references: Map<Column<*>, Column<*>>? = null) : ReadOnlyProperty<Child, Parent?>

Class responsible for implementing property delegates of the read-only properties involved in an optional table relation between two Entity classes, which retrieves the child entity that optionally references the parent entity.

Parameters

reference

The nullable reference column defined on the child entity's associated table.

factory

The EntityClass associated with the child entity that optionally references the parent entity.

Members

Constructors

OptionalBackReference

Link copied to clipboard

constructor(reference: Column<REF?>, factory: EntityClass<ParentID, Parent>, references: Map<Column<*>, Column<*>>? = null)

Functions

getValue

Link copied to clipboard

open operator override fun getValue(thisRef: Child, property: KProperty<*>): Parent?

Generated by Dokka © 2026 Copyright