I have…
- Read the following guideline: Troubleshooting and Support | Squidex. I understand that my support request might get deleted if I do not follow the guideline.
- Used code blocks with ``` to format my code examples like JSON or logs properly.
I’m submitting a…
- Regression (a behavior that stopped working in a new release)
- Bug report
- Performance issue
- Documentation issue or request
Current behavior
If you have a schema with references field and create Object B pointing to Object A in this schema, then when you remove Object A, and query for all objects in schema which have empty references field, Object B will not be returned. I believe this happens because references field in Object B after removal of Object A is not null
, but is an empty array - []
, and squidex when operating query like empty(data/parentId/iv)
is only querying for null values.
Expected behavior
I expect query for empty references array to return all objects, which have either null
or []
references field. Other solution might be to set reference field to null
when last referenced object is being removed.
Minimal reproduction of the problem
- Create schema with references field
- Create Object A in this schema
- Create Object B in same schema, pointing to Object A in references field
- Remove Object A
- Query for objects with empty references field, you shouldn’t receive Object B
http://localhost:80/api/content/{app}/{schema}?$filter=empty(data/parentId/iv)
Environment
App Name: default
- Self hosted with docker
- Self hosted with IIS
- Self hosted with other version
- Cloud version
Version: 7.15.0.0