Closed gump closed 11 years ago
Would you like to provide a pull request for this? Or at least a pull request with failing test?
Is this a duplicate of #9?
Looks like a duplicate indeed. Sorry didn't mean to duplicate ;)
But you are talking about embedded document field, while #9 talks about lists of them?
Hmm. You're right. Didn't read carefully enough. Forgot to add, that unfortunately I don't have a pull request for you with a fix for this. I'm slowly switching from mongo to Postgres with hstore
, so this is no longer needed for my project.
OK. So this is duplicate of #9.
Currently it's not possible to filter by values stored in EmbeddedDocumentField.
When attempting to search by any of the embedded document fields - the error is thrown in "tastypie/resources.py", line 1584, in check_filtering function: raise InvalidFilterError("The '%s' field does not support relations." % field_name)
It is possible to force django-tastypie-mongoengine to allow search by that field (by wrapping the field resource in a class that overrides the is_related value), however it does mean breaking the create/edit actions via the API.