-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
Filter on JSON attribute's values content? #279
Comments
no, I believe it's not possible to filter embedded fields. |
I was able to eventually figure this out -- basically needs a query with a "Where" clause that goes something like this (NOTE: This is Postgres specific), --
Using this approach, I have been able to make progress. It seems like it should definitely be possible to adapt the nestjsx/crud to support such complexity although from a design perspective I see that the query criteria on a request could get rather complicated. Thoughts? |
Any update on this @zMotivat0r ? |
Is it possible to filter on an attribute value embedded in the value of a JSON attribute when using TypeORM with Postgres? Consider this json -- 'attrs' is an attribute of item that has JSON content with fields name and status.
I would like to find all items were the status value is rejected.
Note: The JSON of the attrs column is highly variable from instance to instance.
The text was updated successfully, but these errors were encountered: