optionalBackReferencedOn
Registers an optional reference as an immutable field of the parent entity class, which returns a child object of this EntityClass or null if no child references the parent entity.
The reference could have been defined on the child table in 1 of the following ways:
By the creation of a column using either
optReference()orreference().nullable()By the creation of a non-nullable
reference()column where either 0 or 1 row(s) is expected in the relationship
Samples
org.jetbrains.exposed.v1.tests.shared.entities.EntityTests.Studentorg.jetbrains.exposed.v1.tests.shared.entities.EntityTests.StudentBiosorg.jetbrains.exposed.v1.tests.shared.entities.EntityTests.StudentBioRegisters an optional reference as an immutable field of the parent entity class, which returns a child object of this EntityClass or null if no child references the parent entity.
The reference should have been defined by the creation of a foreign key constraint on the child table, by using foreignKey().