Different size and structure of MondoDB document and access through ORM

MongoDB supports different field size in collection of documents. How to access different document size using Spring Data or any ORM.

For example, In existing application we have Student collection which store documents about Students. Now we need to store some additional fields (optional) in all new Student document (only new documents).

My question is, how can we support different structure of same document and access them using Java ORM.

give a try for this ODM:

by the way, if an ORM maps missing fields to some null value, that should do the job as well. or you may use different schemas for old and new document structures.