Announcement Announcement Module
Collapse
No announcement yet.
mongodb: refresh existing POJO to reflect db changes Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • mongodb: refresh existing POJO to reflect db changes

    The user object is loaded on login time by spring security. Then, during the session:

    Code:
    User self = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    
    doSomething(self.someProperty); // not up-to-date!
    How can db changes be reflected on that object?

    Something like JPA's EntityManager.refresh() would be helpful.

  • #2
    Is this really not possible with Spring Data / MongoDB? -- Just to update an outdated object with fresh contents from the database, like in JPA?
    Last edited by wacker; Aug 28th, 2012, 11:47 AM. Reason: extended rant to spring-data

    Comment


    • #3
      Come on, this should be somehow possible. After 2 months, any ideas?

      Comment

      Working...
      X