SimpleIdServer icon indicating copy to clipboard operation
SimpleIdServer copied to clipboard

SCIM SortBy with EF SqlServer producing duplicate rows and does not sort on non-ValueString properties

Open ray-gilbert opened this issue 2 years ago • 3 comments

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

ray-gilbert avatar Jun 04 '23 22:06 ray-gilbert

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 sortBy parameter.

simpleidserver avatar Jun 05 '23 12:06 simpleidserver

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)?

ray-gilbert avatar Jun 05 '23 23:06 ray-gilbert

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.

simpleidserver avatar Jun 07 '23 20:06 simpleidserver