0 Replies Latest reply on Mar 18, 2010 6:08 PM by Hai-Yun Du

    Entity Update to Database not working

    Hai-Yun Du Newbie
      I am trying to insert or update an entity to the database using the EntityHome object, but it's not working.

      public class PersonHome extends EntityHome<Person> {

           @In(create = true)
           DelegationHome delegationHome;

           public String update() {
                // New leader
                PersonHome leaderHome = new PersonHome();
                Person leader = leaderHome.getInstance();
                // Add leader and current person entity to a new delegation record
                Delegation delegation =     delegationHome.createInstance();
      //          delegationHome.persist();

                return super.update();

      When I call personHome.update() the records do not get updated in the database even when I call persist. What am I doing wrong here?