Closed ghost closed 6 years ago
I have a table with documents which have next body structure
{ ... entity: { id: 1, name: 'entity' } ... }
I want to query these documents by where in condition. So I try to call
where in
db.table.findDoc({ 'entity.id': [1, 2, 3] })
As result SQL query become like this
SELECT * FROM "entities" WHERE ("body" ->> 'entity') IN (1, 2, 3)
but it should be
SELECT * FROM "entities" WHERE ("body" -> 'entity' ->> 'id') IN (1, 2, 3)
Node.js: 8.11.1 Massive: 4.7.2
Thanks for the reports! I didn't know if this was going to be possible at first with all the special handling document criteria already get but it seems to have worked out okay. Update to 4.8.2 next chance you get.
I have a table with documents which have next body structure
I want to query these documents by
where in
condition. So I try to callAs result SQL query become like this
but it should be
Node.js: 8.11.1 Massive: 4.7.2