Announcement Announcement Module
No announcement yet.
Support for MongoDB Random documents structure Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Support for MongoDB Random documents structure

    I've java NoSQL based application with Springframework's spring-data-mongodb support. Simple crud operations went without a hitch.

    But I have a question about the variable structure of documents. If anyone can help me with it please.

    Using the Mongo client I could have two documents of the same collection with different structure. For example in a "Person" Collection one person will have email and the other person phone number. In the spirit of NoSQL I will not fill the collection with null values. Not doing the relational way.

    How does spring-data-mongodb deals with such a scenario. Do we have to re-code @Document Class, so that it reflects the new/changes in fields. If that is the case, how is this dynamic. recompiling/deploy code is as painful as alter table.

    Thanks all, any help appreciated.