Back to Exposed

getOrPutReferrers

docs/api/exposed-dao/org.jetbrains.exposed.v1.dao/-entity-cache/get-or-put-referrers.html

1.2.01.4 KB
Original Source

getOrPutReferrers

fun <ID : Any, R : Entity<ID>> getOrPutReferrers(sourceId: EntityID<*>, key: Column<*>, refs: () -> SizedIterable<R>): SizedIterable<R>

Returns a SizedIterable containing all child Entity instances that reference the parent entity with the provided sourceId using the specified key column.

If either the key column is not present or a value does not exist for the parent entity, the default refs will be called and its result will be put into the map under the given keys and the call result returned.

Generated by Dokka © 2026 Copyright