Announcement Announcement Module
Collapse
No announcement yet.
Unit of work and autogeneration support ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unit of work and autogeneration support ?

    Hello !

    Does spring mongodb already has or plan to have something like JPA's persistence context, where every changes of the entity is tracked, and later when the transaction commits, the engine will autogenerate the sql to update the changes, etc when the transaction commits ?

    Im thinking something like :
    Code:
    MyDomainModel model = mongoPersistenceContext.get(documentId, MyDomainModel.class);
    // model is now 'persistent', and any changes to it will be known by the context
    model.setValue("new value");
    
    // avoiding mongoOps.update(...."myArray.$.myNestedArray.0.value"...)
    mongoPersistenceContext.applyChanges(); // since there's no transaction, an explicit call is ok ?
    I know im just being lazy, but please share your thoughts
Working...
X