https://kotlinlang.org logo
#exposed
Title
# exposed
n

nullium21

09/27/2021, 4:33 PM
how do i do one-to-many? i have an entity like this:
Copy code
class LogChannel(id: EntityID<Long>): LongEntity(id) {
    companion object : LongEntityClass<LogChannel>(LogChannels)
    val guild by GuildConfig referencedOn LogChannels.guild
}

object LogChannels: LongIdTable() {
    val guild = reference("guild", GuildConfigs)
}
and an empty
GuildConfig
entity +
GuildConfigs
table how can i have the
GuildConfig
have a list of all `LogChannel`s that point to it? i've tried this:
Copy code
val foos by LogChannel via LogChannels
but it says "`Table does not reference target`"
ł

Łukasz Bednarczyk

09/28/2021, 4:50 AM
Can you add here the GuildConfig code?
3 Views