Open J0hnG4lt opened 5 years ago
There are two more issues associated with this. First, any discriminator field must allow for shared resources. For example, a patient may have attended more than one clinic. This means that a list should be used as a discriminator. Second, a list cannot be used as a shard key in MongoDB. So, this field should be excluded from #1 .
Maybe adding a discriminator field based on clinics could suffice. This may even help if used along with sharding, so see #1