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
field_null filter not working #10813
Comments
Confirmed bug on latest strapi version 3.6.8 . |
duplicate: #5414 |
@derrickmehaffy The duplicate post is using graphql for api and i am using rest API. |
This is a big issue and a core feature for strapi without which strapi can't be called cms. Why is it still not solved, why its severity is so low. |
The issue doesn't come directly from the interface used with the _null filter as it's a database problem. One that we are already aware of in the v3 hence why I marked it as a duplicate.
Severity is set based on how it impacts Strapi as a whole. This is a rough breakdown of how we set Severity: SeverityDefine the priority:
We are already deeply aware that it's not possible to filter on relational fields with the The _null filter still works on all normal fields and only impacts relational fields, hence it's considered a very niche usage. |
Bug report
field_null filter not working
If I talk particularly of my strapi panel , i have two collections , one names "devices" and one named "patient", I have a one-to-one relation of device with patient (i.e device belong to one patient) . But when i want to fetch list of devices which is not assigned to any patient (i.e patient == null) , I use filter patient_null = true in get API as described in strapi official documentation, but the API returns empty array instead of list of patients. I have a lot of devices who is not assigned to any patient. I have tried same with patient API where device == null (device_null : true) , have also tried equals filter (device_eq: null) , nothing works. I have tried with other content types with a relation and have concluded that null filter doesn't work with relations . I have tried deleting my database and create everything from fresh. I have attached screenshots for same , please check them.
Steps to reproduce the behavior
Expected behavior
It should return an array of those entities whose relation field is null.
Screenshots
System
Additional context
I have made a mistake choosing strapi for developing an enterprise application, I thought it has become stable but working on it I have concluded that minor internal issues keep popping up in strapi and also any change in content-type schema often leads to whole database corruption, strapi doesn't give any option to force delete a row which is having DB issue. There are many issues which needs to be resolved before strapi can be used in enterprise. Bulk uploading api's and required relation field check should be there in API's are must in strapi. I must admit strapi have made my work a lot easier . Strapi is like dreams come true except for some minor issues.
(Just honest feedback from a user who has been using strapi for his projects for nearly a year now. )
The text was updated successfully, but these errors were encountered: