I would like to request adding support for nullable FKs. At least in Postgres, a FK that's nullable doesn't reference any PK and is therefore valid. This would allow mapping optional relations to the entities, as sometimes it's required.
protected fun <U : AbstractDbColumn<T, *>, V : Any?> U.nullableForeignKey(
references: AbstractDbColumn<V, *>,
fkName: String? = null,
): U =
this.also {
kotysaForeignKeys.add(ForeignKey(mapOf(this to references), fkName))
}
maybe something like this?
If the feature is already possible to implement, please tell, because I couldn't find it in the documentation
I would like to request adding support for nullable FKs. At least in Postgres, a FK that's nullable doesn't reference any PK and is therefore valid. This would allow mapping optional relations to the entities, as sometimes it's required.
maybe something like this?
If the feature is already possible to implement, please tell, because I couldn't find it in the documentation