|
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()
|
Answered by
pponec
Aug 25, 2022
Replies: 2 comments 3 replies
|
See the doc https://www.ktorm.org/en/entity-finding.html#Get-Entities-by-Sequences |
2 replies
|
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 |
1 reply
Answer selected by
pponec
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

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.