Open sadortun opened 3 years ago
Thanks for the PR and investigation. Would you be willed to send a PR with the fix and a regression test case?
@davimacedo It may take a few days, but Yeah sure! If you confirm that the proposed solution above will not break everything :) I'm just smashing the keyboard until something works 🙈 😅
Thanks @sadortun . If all tests continue passing, it will probably not break anything. It is important to also add a new regression test case covering the problem you are trying to fix and maybe other tests to check potential problems you may think about.
@davimacedo @dplewis off topic question :) would it be possible that you add some information about the release cycles in the readme ? It would be really nice to have at least a patch release every month
@sadortun Parse Server currently does not have release cycles, but it is something we are looking into, see this discussion.
Hey @davimacedo should I iterate only over and, or, not
or on all the special QueryKeys?
I believe only over and, or, not
New Issue Checklist
Issue Description
Hi !
I have a
beforeFind
trigger that add a few restrictions on a child type, when executingparent.query().find()
the server throw aInvalid key "$relatedTo"
Steps to reproduce
I have a
Parent
with arelation
to aChild
Then:
On the client
Actual Outcome
Expected Outcome
An happy relation! 👪
Failing Test Case / Pull Request
It seems that
reduceRelationKeys
only checks for a Top level$or
, and in my case, the top level operator is$and
This seems like it 'fixes' the issue :
Environment
Server
4.5.0
windows
local
Database
mongo
4.4?
local
Client
js
3.1.0
Logs