Open eibrahimov opened 9 months ago
Try active_processes = ProcessIDs.objects.filter(data={"redirect_ids":{"status":'active'}})
Hi,
[EDIT] I have done this with a djongo version before Nov 13 merge. Maybe now it is fixed but still not uploaded to PIP so try with building from repo and use syntax proposed by @raykhey [/EDIT]
the problem is with LikeOp and CmpOp from operators.py
- there should be a recursive dictionary crawler to build a proper Mongo query. My workaround was:
LikeOp
by adding some method to crawl dictionary and CmpOp
to properly build queryDid any one find the solution for this? Actually, this is the basic need for normal query.
I am using Djongo to integrate MongoDB with my Django project. I have a model with a
JSONField
and I am trying to filter based on a nested field within theJSONField
. Here's a simplified version of my model and the query I am attempting:This query results in the following error:
FieldError: Unsupported lookup ‘redirect_ids’ for JSONField or join on the field not permitted.
I am looking for a way to filter by the nested field data->redirect_ids->status using Django ORM with Djongo. Is this a known limitation, or is there a workaround to achieve this?