English | 简体中文

api-docs / org.ktorm.schema / ReferenceBinding

ReferenceBinding

data class ReferenceBinding : ColumnBinding (source code)

Bind the column to a reference table, equivalent to a foreign key in relational databases.
Entity sequence APIs would automatically left-join all references (recursively) by default.

Constructors

NameSummary

<init>

ReferenceBinding(
    referenceTable: BaseTable<*>,
    onProperty: KProperty1<*, *>)

Bind the column to a reference table, equivalent to a foreign key in relational databases.
Entity sequence APIs would automatically left-join all references (recursively) by default.

Properties

NameSummary

onProperty

val onProperty: KProperty1<*, *>

the property used to hold the referenced entity object.

referenceTable

val referenceTable: BaseTable<*>

the reference table.

Extension Functions

NameSummary

eq

infix fun <T : Any> T.eq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Equal operator, translated to = in SQL.

neq

infix fun <T : Any> T.neq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.

notEq

infix fun <T : Any> T.notEq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.