3 ms·
This looks very cool I might consider using it! The way I'm setting up Mongo for my project[1] is that all items go into a single collection and use a multi ke
by josevalerio 4y ago
This looks very cool I might consider using it!
The way I'm setting up Mongo for my project[1] is that all items go into a single collection and use a multi key index on a `target` array so queries look like this:
{ $and: [ { target: { $elemMatch: { id: `user`, type: 'entityType' } } }, { target: { $elemMatch: { id: 'ACTIVE', type: 'status' } } }, ] }
Demo form Rick Houlihan here: https://youtu.be/eEENrNKxCdw?t=1136 https://youtu.be/eEENrNKxCdw?t=1136
Does Papr support this type of schema? I didn't see a way to combine them into one Model and use it like "db.findOne()". I guess sort of what I'm asking for is discriminators? [2].
[1] https://github.com/plutomi/plutomi/pull/776 https://github.com/plutomi/plutomi/pull/776
[2] https://github.com/plexinc/papr/issues/236 https://github.com/plexinc/papr/issues/236