Storing multiple types of objects in one collection in MongoDB using NoRM

MongoDB has no schema. That way, I can technically store any number of different types in one collection. Currently, we need to store several objects that inherit from the same base class in the same collection. Is it possible to use NoRM?

For example, we have a collection of Person, but this person’s collection contains fathers who are inherited from Person and Mothers, which are inherited from Person, etc. We need their properties specific to their father and mother to be preserved, and then when they are pulled from Mongo, we want to create the corresponding object. Is this possible with NoRM?

+3
source share
1

, , ....

, NoRM, , . , , , 10gen MongoDB #.

. , .

0

All Articles