Questions tagged [embedded-documents]
95 questions
0
votes
2 answers
Why does MongoDB not support queries of properties of embedded documents that are stored in hashed arrays?
Why does MongoDB not support queries of properties of embedded documents that are stored using hashes?
For example say you have a collection called "invoices" which was created like this:
db.invoices.insert(
[
{
…

CommaToast
- 11,370
- 7
- 54
- 69
0
votes
1 answer
how to query for embedded documents using sails blueprints
Mongo describes an embedded query like this:
db.inventory.find(
{
producer:
{
company: 'ABC123',
address: '123 Street'
}
}
)
Therefore I would expect a sails blueprint query for embedded docs…

Cort Fritz
- 143
- 1
- 5
0
votes
2 answers
Query with multiple conditions on a nested entry in MongoEngine
I have a Document A that contains a ListField b of a particular
type EmbeddedDocument B, which have two StringFields x and y.
class B(EmbeddedDocument):
x = StringField()
y = StringField()
class A(Document):
b =…

Emanuel Vianna
- 161
- 8
0
votes
2 answers
mongodb find single embedded document as an object not as an array
I wonder if there is a way to get a single object instead of an array when querying for a single embedded document in MongoDB
I have Groups with embedded Users
{
groupname: "Admins",
users: [
{
email: bob@google.com,
…

webmaster
- 1,960
- 24
- 29
0
votes
1 answer
Use embedded documents, if the embedded document get's queried very often?
The basic data model consists of 3 objects:
A: ObjectId id, String name, List of B objects
B: ObjectId id, String name
C: ObjectId id, reference to B object
Objects of type A and B will get created very infrequently (maybe one of those objects per…

Benjamin M
- 23,599
- 32
- 121
- 201