Closed goodnull closed 1 year ago
even though mongodb itself doesn't enforce a schema, mongodb.entites does try to keep the developer disciplined by having 1 class per collection. this is by design and you're not supposed to store multiple classes/entity types in the same collection.
when you say I now have multiple Collections
, do you mean the structure of the data is the same in those?
if so, why not store all similar data structures/docs in the same collection?
Is there any other way besides using
CollectionAttribute
?I now have multiple Collections, and their structures are the same. I don’t want to define multiple classes.