Announcement Announcement Module
No announcement yet.
Refreshing entities using spring data Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Refreshing entities using spring data

    I am using spring data almost exclusively for data access in my app but I haven't found a way to refresh entities.

    In one case I have a spring web flow for a checkout type functionality that sets a bean to a flowscope. It has a reference to an entity but later in the flow I need to refresh the entity in a transaction.

    I could read it again but would like to avoid this.

    Is it a bad idea to keep references to the entity in the flow scope (session)?
    In general is there a way using Spring Data to refresh the entity before access?

    Please help as I am stuck on this and I haven't found information on this.

    Thanks in advance.
    Last edited by lilolme; Jul 16th, 2012, 01:56 AM.

  • #2
    Can anyone please help with this? This has resurfaced and as we are going to do trials it is becoming more important.

    When using spring data, there is no direct access to the underlying entity manager (is there?)
    I have a flow with some entities which need to be resyncd at each step.
    How do I reattach the entities and resync them?