how i can update an stored CMP ? which method i should use.
posted 11 years ago
Hi Thank you for reading my post. how i can update an entity which is stored in database when i have its primary key ? I know that when we want to insert a record we use create method bu i do not know how to update a record
You should call a finder() method for the entity bean using the primary key. Then once you have the object, any changes made to will be reflected in the database. Finder methods are generally declared in the Home Interface and can be 'coded' using EJB QL in the deployment descriptor.