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 found no way of doing this (see title)
I tried this, but it doesn't work because there is no way to know which column is the source
object Users : IntIdTable() {
val name = varchar("name", 50).index()
}
object UsersToUsers : Table() {
val parent = reference("parent_user_id", Users)
val child = reference("child_user_id", Users)
}
classUser(id:EntityID<Int>) : IntEntity(id) {
companionobject:IntEntityClass<User>(Users)
var name by Users.name
var users by User via UsersToUsers//Doesn't work
}
Exception in thread "main" java.lang.IllegalStateException: Table does not reference source
at org.jetbrains.exposed.dao.InnerTableLink.getSourceRefColumn(Entity.kt:124)
at org.jetbrains.exposed.dao.InnerTableLink.setValue(Entity.kt:147)
I don't know if it's the best way, but I would like to specify the "source ref column"
something like this
classUser(id:EntityID<Int>) : IntEntity(id) {
companionobject:IntEntityClass<User>(Users)
var name by Users.name
var users by User via UsersToUsers.parent
}
I found no way of doing this (see title)
I tried this, but it doesn't work because there is no way to know which column is the source
Exception in thread "main" java.lang.IllegalStateException: Table does not reference source
at org.jetbrains.exposed.dao.InnerTableLink.getSourceRefColumn(Entity.kt:124)
at org.jetbrains.exposed.dao.InnerTableLink.setValue(Entity.kt:147)
I don't know if it's the best way, but I would like to specify the "source ref column"
something like this
The solution am using right now
3ricL@fff5f6f
The text was updated successfully, but these errors were encountered: