Hi I'm trying to retrieve an entity from DB through a JPQL query here's relevant code:
manager.getTransaction().begin(); Query query = manager.createQuery(jpql); List results = query.getResultList(); Object obj = results.get(0); //change obj reference to include new values manager.getTransaction().commit(); I debugged and my query works fine..I get the correct object, and my merge logic works too..the object has new values in it..now what happens is when I do a commit on the transaction, the entity is not updated in the data store. My question is this, does retrieving an entity using a JPQL query attach that entity to the persistence context? I'm not sure why when I retrieve the entity, change it then commit the transaction...the update is not reflected in the data store. Any help appreciated. thanks -- Alessandro Ferrucci
