jxmono / crud

:fork_and_knife: CRUD for mono
MIT License
0 stars 1 forks source link

Add support for multiple-template items #6

Closed gabipetrovay closed 11 years ago

gabipetrovay commented 11 years ago

DMS items should support multiple templates.

Adjust the queries such that the _tp property is an array of ObjectIds.

ottiker commented 11 years ago

This was already possible due to the ability of MongoDB querying arrays values with the "equal" operator.

var document_in_db = {array: [1, 2, 3]};
var query = {array: 1}; // this returns 2