Closed
Description
Gerrit Meier opened DATAGRAPH-1345 and commented
It would be nice to have @OrderBy
annotation specifying the ordering of the elements of a @Relationship
collection.
For example:
{{@OrderBy
("firstName ASC, lastName ASC")
@Relationship
("HAVE_USER")
private Set<User> users = new LinkedHashSet<>();}}
This would perform the ordering at the DB level by firstName then lastName with ASC. I know that we can do it programmatically with SortedSet but I guess DB level is a much more great way of doing this.
A LinkedHashSet
preserves order based on insertion order that is why I used that one
Affects: 6.0 M2 (2020.0.0)
Reference URL: neo4j/sdn-rx#227