In our application UI, we're displaying a table of contents that shows user information, i.e.
firstName
, lastName
, email
, phoneNumber
, role
, userType
The last two columns, role
and userType
are NOT part of the User
domain object. They are derived in the serviceImpl
class and populated in the userRoleDTO
object that is being returned as part of the rest call.
In this case, if I want to sort with User
domain parameters, e.g.
.../user-service/api/users-with-roles?size=10&page=0&sort=email,asc
it works fine.
How do I make this work with
user-service/api/users-with-roles?size=10&page=0&sort=role,asc
or
user-service/api/users-with-roles?size=10&page=0&sort=userType,asc
?