• Post Reply Bookmark Topic Watch Topic
  • New Topic

how i can update an stored CMP ? which method i should use.

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Scott Selikoff
author
Bartender
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!