← Back to Stormify Documentation

getDetails

fun <M : Any, T : Any> getDetails(parent: M, detailsClass: Class<T>, propertyName: String? = null): List<T>

Returns the detail rows of type detailsClass that reference parent. Use propertyName to disambiguate when the detail class has multiple foreign keys pointing at the same parent type.


fun <M : Any, T : Any> getDetails(parent: M, detailsClass: Class<T>, referenceField: ReferencePath): List<T>

Type-safe variant of getDetails that accepts an annotation-processor-generated reference path (e.g. Paths.AuditEntry_.createdBy()) instead of a string. The compiler guarantees the referenced property exists on the child type, so typos and renames surface at build time rather than on first query.