1 Reply Latest reply on Sep 28, 2009 4:13 PM by Elmar Weber

    HibernateEntityHome: Call to update() Doesn't Persist Changes to Database after call to persist()

    Elmar Weber Newbie

      I'm extending HibernateEntityHome for an entity (eHome). For debugging purposes I have put just a few input fields and two buttons calling the eHome.persist() and eHome.update() methods respectively.

      I load the page, enter some data and on the call to #persist() all database queries are executed as expected and the page is reloaded. Now I change a data field and call #update() which results in no database update whatsoever.
      When I load the page and assign the id of the managed object to eHome.id the update call works (as documented in the Seam reference manual).

      What I cannot understand is why. The id is set on the persist call anyway (Home#assignId), so why doesn't a call to #update() after #persist() work?

      Thanks for any hints in advance.