-
I get an error when I try to sort the
It looks like the val result = database
.sequenceOf(Employees(), withReferences = true)
.sortedBy { Departments.name.asc() }
.toList()
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
See the doc https://www.ktorm.org/en/entity-finding.html#Get-Entities-by-Sequences |
Beta Was this translation helpful? Give feedback.
-
I'll try to phrase the question better: how can I get a list of employees filtered by the name of their employer - using the val result2 = database.sequenceOf(Employees())
.filter { (it.supervisorId.referenceTable as Employees).name eq "John" } // NPE !
.toList() The problem with this query is that the filter throws a |
Beta Was this translation helpful? Give feedback.
I'll try to phrase the question better: how can I get a list of employees filtered by the name of their employer - using the
EntitySequence
? I would like to use the following query pattern:The problem with this query is that the filter throws a
NullPointerException
.