# referencedOn

infix fun <REF : Any> referencedOn(column: Column<REF>): Reference<REF, ID, T>

Registers a reference as a field of the child entity class, which returns a parent object of this `EntityClass`.

The reference should have been defined by the creation of a column using `reference()` on the child table.

#### Samples

org.jetbrains.exposed.v1.tests.shared.entities.EntityTests.Parentorg.jetbrains.exposed.v1.tests.shared.entities.EntityTests.Childrenorg.jetbrains.exposed.v1.tests.shared.entities.EntityTests.Child

infix fun referencedOn(table: IdTable<*>): Reference<Any, ID, T>

Registers a reference as a field of the child entity class, which returns a parent object of this `EntityClass`.

The reference should have been defined by the creation of a foreign key constraint on the child table, by using `foreignKey()`.

#### Samples

org.jetbrains.exposed.v1.tests.shared.entities.CompositeIdTableEntityTest.Publisherorg.jetbrains.exposed.v1.tests.shared.entities.CompositeIdTableEntityTest.Authorsorg.jetbrains.exposed.v1.tests.shared.entities.CompositeIdTableEntityTest.Author