Smorg
12/06/2023, 9:20 AM// entities
class FooEntity(id: EntityID<UUID>) : UUIDEntity(id = id) {
var bar by BarEntity referencedOn FooTable.bar
}
class BarEntity(id: EntityID<UUID>) : UUIDEntity(id = id) {
}
// attempt at inserting
FooEntity[<random-id>].bar = BarEntity(id = EntityID(id = <id>, table = BarTable))
// instead of
FooEntity[<random-id>].bar = BarEntity[<id>]
I am trying to do it this way because of performance; not having to fetch the full BarEntity
but maybe that isn’t necessarily a concern with Exposed