# OptionalReferrers

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

### Deprecated

The OptionalReferrers class is a complete duplicate of the Referrers class; therefore, the latter should be used instead.

#### Replace with

    Referrers

Content copied to clipboard

Class responsible for implementing property delegates of the read-only properties involved in an optional one-to-many relation, which retrieves all child entities that optionally reference 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.

cache

Whether loaded reference entities should be stored in the EntityCache.

## Constructors

OptionalReferrers
Link copied to clipboard
constructor(reference: Column<REF?>, factory: EntityClass<ChildID, Child>, cache: Boolean, references: Map<Column<*>, Column<*>>? = null)

## Properties

allReferences
Link copied to clipboard
val allReferences: Map<Column<*>, Column<*>>
cache
Link copied to clipboard
val cache: Boolean
factory
Link copied to clipboard
val factory: EntityClass<ChildID, Child>
reference
Link copied to clipboard
val reference: Column<REF?>

## Functions

getValue
Link copied to clipboard
open operator override fun getValue(thisRef: Parent, property: KProperty<*>): SizedIterable<Child>
orderBy
Link copied to clipboard
fun orderBy(vararg order: Pair<Expression<*>, SortOrder>): Referrers<ParentID, Parent, ChildID, Child, REF?>
infix fun orderBy(order: List<Pair<Expression<*>, SortOrder>>): Referrers<ParentID, Parent, ChildID, Child, REF?>

Modifies this reference to sort entities based on multiple columns as specified in order.

infix fun orderBy(order: Pair<Expression<*>, SortOrder>): Referrers<ParentID, Parent, ChildID, Child, REF?>

Modifies this reference to sort entities according to the specified order.

infix fun orderBy(expression: Expression<*>): Referrers<ParentID, Parent, ChildID, Child, REF?>

Modifies this reference to sort entities by a column specified in expression using ascending order.