Skip to content

Would be nice to have @OrderBy on collection relationships [DATAGRAPH-1345] #1907

Closed
@spring-projects-issues

Description

@spring-projects-issues

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.

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

Metadata

Metadata

Labels

status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions