com.tianyisoft.database.relations.HasOne.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of querybuilder Show documentation
Show all versions of querybuilder Show documentation
A query builder from laravel
The newest version!
package com.tianyisoft.database.relations
open class HasOne(
override val table: String,
override val foreignKey: String,
override val localKey: String = "id"
) : HasMany(table, foreignKey, localKey) {
override var recursive = false
override fun clone(): Any {
val hasOne = HasOne(table, foreignKey, localKey)
hasOne.recursive = recursive
copyAttributes(hasOne)
return hasOne
}
override fun copy(): HasOne {
return clone() as HasOne
}
}