-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'orderBy' conversion is wrong in case I also include a non encrypted value #65
Comments
I'm not familiar with the array syntax for
|
First of all, sorry, I see I made a typo. My expected result would be:
I changed it in the original issue as well. With an array syntax in But let's say the
If there are multiple visitors with the same https://www.prisma.io/docs/concepts/components/prisma-client/filtering-and-sorting#sorting |
I see, it makes more sense with the correction. That being said, ordering on the hash will not give you the result you expect. While you would indeed have multiple visitors with the same name being neighbours in the resulting array, ordered by |
🎉 This issue has been resolved in version 1.4.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Version 1.4.5 includes a "fix" only for the misdetection of the |
Yeah you're right. Sorting on the hash never results in a usefull outcome. But should in this case the encrypted field then be taken out by the array? So your're left with just:
or would you throw the same error as on a single EDIT: Ah you're faster than light :) It became the last option. Thanks for your fast responses! |
Well I tried to get this:
to become this:
but the overwriting mechanism is not (yet) smart enough to know how to prune an empty object or array, so I end up with this:
which causes the query to throw, after displaying the error that |
The situation is the following:
The prisma schema:
I would like to do a
findMany
with aorderBy
on thekey
and on thecreated_at
.I understand it is quite useless to sort on a encrypted value and I kinda understand the desision made in issue #43. If I only sort on a encrypted field I get the silent error:
Error: Running
orderByon encrypted field Visitor.key is not supported (results won't be sorted).
But I will do the following:
which does not result in a silent error but in the following:
Which results in a Primsa error
Argument orderBy: Got invalid value
since you should only provide 1 property per object.I would expect it to convert to:
or in case you want to prevent sorting on encrypted fields
Please let me know if you need more information!
The text was updated successfully, but these errors were encountered: