-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.6.0
-
Component/s: Querying
-
None
-
Environment:Ubuntu 10.04, 64-bit
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
Consider the following document:
db.session.save({'id': 1, 'items': [
{'id': 1, 'name': 'foo'},
{'id': 2, 'name': 'bar'},
{'id': 3, 'name': 'baz'}]})
I'd like to be able to filter down to only the single
{'id': 1, 'name': 'foo'}item in the 'items' list. This seems to not be possible. I can only seem to filter down to the entire 'items' list, and then in code (Python) I have to reduce the resulting list down to the 1 item I'm looking for.
This just seems like something that should be easily done by the database. Bringing this up in the IRC channel resulted in 2 other people stating that they were actively working around the same problem.