prisma-engines
3b855bbb - fix: fix missing many-to-many filters (#5404)

Commit
338 days ago
fix: fix missing many-to-many filters (#5404) [ORM-950](https://linear.app/prisma-company/issue/ORM-950/update-changing-wrong-record-as-a-side-effect) This PR refactors the code so that we will always apply all relevant filters to fields that relate to other models. It's not as straight forward as it'd seem because of the m2m case where the filter has to be applied inside of `build_get_related_records` - the reason being that it's impossible to create a `Filter` up front because the field we filter by does not exist in the model (it's in the A-B table that links m2m models), so we can't create a `ScalarField`. The existing code already had the capability to apply filters to these fields, so I just extended it to enable it to have an arbitrary number of filters added to it and the filters are then applied in `build_get_related_records`. I've also moved all skipped tests into `fail`.
Author
Parents
Loading