Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-31-2018 03:33 PM
When it comes to how the OGM maps query results to @Relationship
List properties, is it expected that the result order should be retained in the list?
I’m ordering the results by a property order
on the respective relationship. The raw results comes back in expected order, but the List property on my POJO is mapped out of order. Note I'm using Kotlin:
@Relationship(type = "ALONG", direction = Relationship.OUTGOING)
var axes: List<Axis>? = null
Can't really find much info on this topic – thanks!
Solved! Go to Solution.
09-06-2018 02:09 AM
Currently Neo4j-OGM does not keep the order of a sortable type. There is an issue (https://github.com/neo4j/neo4j-ogm/issues/386) I also commented and tried to solve. It may get back in focus when we do a 4.0 version in the future but nothing I see in any upcoming minor version right now.
If your entities have something like a computable sort order you can achieve this in your application code: https://neo4j.com/docs/ogm-manual/current/reference/#_ordering
09-06-2018 02:09 AM
Currently Neo4j-OGM does not keep the order of a sortable type. There is an issue (https://github.com/neo4j/neo4j-ogm/issues/386) I also commented and tried to solve. It may get back in focus when we do a 4.0 version in the future but nothing I see in any upcoming minor version right now.
If your entities have something like a computable sort order you can achieve this in your application code: https://neo4j.com/docs/ogm-manual/current/reference/#_ordering
09-07-2018 05:31 PM
Thanks, after digging through various issues I realized this is fully documented exactly where it should be! Thanks again
https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#_ordering
All the sessions of the conference are now available online