neo4j / sdn-rx

Nextgen Spring Data module for Neo4j supporting (not only) reactive data access and immutable support
https://neo4j.github.io/sdn-rx
Apache License 2.0
65 stars 23 forks source link

Would be nice to have @OrderBy on collection relationships #227

Closed aaramg closed 4 years ago

aaramg commented 4 years ago

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.

meistermeier commented 4 years ago

Since we are in a migration process to the original Spring Data Neo4j and have to archive this repository, the issue also go migrated to: https://jira.spring.io/browse/DATAGRAPH-1345 Please watch or comment on the issue in Jira for further communication.