SCIM SortBy with EF SqlServer producing duplicate rows and does not sort on non-ValueString properties
Looks like Linq join from Representation to attribute does not use fullpath so can end up with multiple results. Also, does not honor lastChild.SchemaAttribute.Type and only sorts on ValueString property value.
Have a fix if required - just not sure how to submit PR
Hello, indeed the Sort feature is not working.
The issue is fixed in the master and the following modifications have been made :
- Sort on any types of fields.
- Update the LINQ expression to get only the attributes targeted by the
sortByparameter.
Thanks, well done. Solves my sorting issue.
What is the expected outcome for unhappy path e.g. SortBy = "meta.created" now sorts by date.
But SortBy = "created" throws an exception. Should scim throw an exception that explicity states that it has a bad SortBy term or just return default sort (s => s.id)?
First sorry for the late reply and thank you to report this issue.
The issue is fixed in the master branch.
When the property specified by sortBy doesn't exist, then the representations are sorted by the Identifier.