Radzen 6.0.x Order By Always Encrypted Field

Hey team, since upgrading to 6.0.x any order by clauses generated now always throw an error on any of our always encrypted data fields since the new code in the QueryableExtensions code generates a coalesce statement which cannot be used on always encrypted columns. For now we reverted back to 5.9.9 and everything works fine. Is there a way to give us some way to specify if we want the coalesce statement or not?

Thanks!

I’m afraid this is not possible. How do you EF OrderBy() on such field?

If I have a SQL query that is

Select FirstName, LastName from clients order by LastName

and the LastName field is encrypted using Always Encryption then it works fine, but with the latest version of Radzen that same query is generated as

Select FirstName, LastName from clients order by COALESCE(LastName, N'')

which results in an error on Always Encrypted fields

Does that make sense?

I’ll check if we can improve this since this not needed in this case.

1 Like

Enchev -

Thanks for the ultra fast turnaround time on making an improvement to this! Unfortunately for our situation the encrypted field is part of a reference table so the sortproperty is something like 'case.client.lastname' which still triggers the coalesce statement.I wonder if there might be an opportunity to add a column property for "IsEncrypted" or something like that to trigger ignoring the coalesce statement? Perhaps only do it for nullable string types (string?) and not any string? We can't be the only ones using column encryption and having some type of way to circumvent features that don't play nice with encrypted columns would be very beneficial.

Let me know your thoughts and thanks for all your help!

I've removed completely the Coalesce call for OrderBy() in our just released Radzen.Blazor 6.3.2.

1 Like

You are the man!

I can confirm latest version fixed the sorting issue for us with encrypted columns.

Thanks a million for the crazy fast turnaround time!