via
infix fun <TID : Any, Target : Entity<TID>> EntityClass<TID, Target>.via(table: Table): InnerTableLink<ID, Entity<ID>, TID, Target>
Registers a reference as a field of the child entity class, which returns a parent object of this EntityClass, for use in many-to-many relations.
The reference should have been defined by the creation of a column using reference() on an intermediate table.
Parameters
table
The intermediate table containing reference columns to both child and parent objects.
Samples
org.jetbrains.exposed.v1.tests.shared.entities.EntityHookTestData.Userorg.jetbrains.exposed.v1.tests.shared.entities.EntityHookTestData.Cityorg.jetbrains.exposed.v1.tests.shared.entities.EntityHookTestData.UsersToCitiesfun <TID : Any, Target : Entity<TID>> EntityClass<TID, Target>.via(sourceColumn: Column<EntityID<ID>>, targetColumn: Column<EntityID<TID>>): InnerTableLink<ID, Entity<ID>, TID, Target>
Registers a reference as a field of the child entity class, which returns a parent object of this EntityClass, for use in many-to-many relations.
The reference should have been defined by the creation of a column using reference() on an intermediate table.
Parameters
source Column
The intermediate table's reference column for the child entity class.
target Column
The intermediate table's reference column for the parent entity class.