Skip to content

Sort can not use the metamodel classes generated by QueryDSL [DATAMONGO-1085] #2005

Closed
@spring-projects-issues

Description

@spring-projects-issues

Jordi Llach Fernandez opened DATAMONGO-1085 and commented

When working with QueryDSL I would like to be able to sort queries in a type-safe way, and not just when building queries.

To be able to sort by the metamodel classes generated when using QueryDSL the method getKeyForPath of class org.springframework.data.mongodb.repository.support.SpringDataMongodbSerializer must be improved in order to allow dealing with metadata names like : customer.lastName, customer.metadata.creationDate and so on (where metadata is an embedded document).
These metadata names are generated by using the metamodel classes as follows : QCustomer.customer.firstName.toString() (metamodel generated from sample project http://spring.io/guides/gs/accessing-data-mongodb/).
Support in sorting through embedded documents would also be welcomed, note that special care must be taken because QueryDSL creates intermediate "useless" classes that must be ignored when creating the real path of the desired field to be used


Affects: 1.6 GA (Evans)

Referenced from: pull request #236

Backported to: 1.6.2 (Evans SR2)

1 votes, 4 watchers

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions