|
Hi, data class Edge(
val endA: EdgeEnd,
val endB: EdgeEnd,
)
data class EdgeEnd(
val description: String,
val multiplicity: Int,
val nodeRef: UUID
)
data class Node(
val nodeId: UUID,
val description: String,
) {
val edges
get() = find(? see question below ?)
}For a given node, to find all it's edges I need the equivalent of 'find((endA.nodeRef eq id) or ((endB.nodeRef eq id)). How do I achieve that using ObjectFilters? |
Answered by
anidotnet
Mar 18, 2021
Replies: 0 comments 4 replies
|
As you are trying to access nested property, those infix extension methods are not usable here. You can call the find method on repo as below: import org.dizitart.no2.objects.filters.ObjectFilters.eq
...
repo.find(eq("endA.nodeRef", id) or eq("endB.nodeRef", id))The extension methods are only for top-level properties. |
3 replies
Answer selected by
anidotnet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As you are trying to access nested property, those infix extension methods are not usable here. You can call the find method on repo as below:
The extension methods are only for top-level properties.