J0hnG4lt / patient

Microservice that uses Spring Boot and Mongo
0 stars 0 forks source link

Add support for multitenancy #8

Open J0hnG4lt opened 5 years ago

J0hnG4lt commented 5 years ago

Maybe adding a discriminator field based on clinics could suffice. This may even help if used along with sharding, so see #1

J0hnG4lt commented 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 .