You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to specify a custom name for a foreign key:
object Users : IdTable<Long>("user") {
overrideval id = long("id")
.primaryKey()
.autoIncrement("user_id_seq")
.entityId()
val documentId = reference(
onDelete =ReferenceOption.SET_NULL,
foreign =Documents,
name ="document_id"// <- can set column name, but foreign key cannot be named.
).nullable()
}
However looking at current implementation, it seems that fk_${table_name}_${table_column}_${foreign_column} pattern is used and cannot be changed (notice how refName is constructed):
I'd like to specify a custom name for a foreign key:
However looking at current implementation, it seems that
fk_${table_name}_${table_column}_${foreign_column}
pattern is used and cannot be changed (notice howrefName
is constructed):Exposed/src/main/kotlin/org/jetbrains/exposed/sql/Constraints.kt
Lines 40 to 51 in 062083e
I guess it kinda relates to #470 which I've opened some time ago.
The text was updated successfully, but these errors were encountered: