Results 1 to 3 of 3

Thread: mongodb: refresh existing POJO to reflect db changes

  1. #1
    Join Date
    May 2009
    Posts
    3

    Default 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. #2
    Join Date
    May 2009
    Posts
    3

    Default

    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 at 11:47 AM. Reason: extended rant to spring-data

  3. #3
    Join Date
    May 2009
    Posts
    3

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •