You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a recommended way to sort on computed fields? For instance, in my application, I want to sort by ignoring the diacritics (é, è, à, etc..). To do so, I use apoc.text.clean(department.name) with a custom query and a Pageable. This used to work in spring-data-neo4j 5, but doesn't work anymore.
: Cannot handle order property `apoc.text.clean(department.name)`, it must be a simple property or one-hop path.
We don't see any reasons not to support this for custom queries. Custom queries must be used with discretion anyway to avoid Cypher injection, so we decided to lift those restrictions, allowing function calls in sorts.
michael-simons
changed the title
Sorting on computed fields in custom queries
Allow function calls in Sort / Pageable objects in custom queries.
Jun 1, 2021
Hello!
Is there a recommended way to sort on computed fields? For instance, in my application, I want to sort by ignoring the diacritics (é, è, à, etc..). To do so, I use
apoc.text.clean(department.name)
with a custom query and aPageable
. This used to work in spring-data-neo4j 5, but doesn't work anymore.The pageable I use is the following..
Thank you!
The text was updated successfully, but these errors were encountered: