Would be nice to have @OrderBy on collection relationships [DATAGRAPH-1345] #1907
Labels
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
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 oneAffects: 6.0 M2 (2020.0.0)
Reference URL: neo4j/sdn-rx#227
The text was updated successfully, but these errors were encountered: