3 Replies Latest reply on May 3, 2007 12:55 AM by Christian Bauer

    Update database record with EntityManager

    Joe Greene Novice

      I've seen several examples for persisting entity objects, and even removing them from databases, but I can't seem to find a good example of how to use the EntityManager to update a database record for an entity. For example, if I have an Account entity object called "acct", and I've made a few changes to it, isn't there a call similar to "em.persist" that I can make that will update this record? I've seen an example where a transaction is started, the entity properties are set, then the transaction is closed, but there's hopefully a different way than this, using just a reference to the modified entity. Maybe I've just not been looking in the right place, but any help will be appreciated. Thank you.