Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

About CMP

843829Dec 30 2002 — edited Dec 31 2002
Dear all experts,

I am trying out a CMP example and I have a few questions which is puzzle me. I am trying to add a new record into database by calling ejbCreate() method, and there are only setter method inside ejbCreate() method method. So, where am I going to call the INSERT sql command?
Besides, where to write the implementation for the findByPrimaryKey() finder method?


Database name: Product
----------------------
product_id product_name product_desc
DVD100 DVD Player DVD with DTS features


JSP Page
--------
myProductHome.create("DVD200","DVD Player","VCD without DTS features");
myProductHome.findByName("DVD Palyer");



Initially, there is a record inside the databse, and I wanna search by product_name and generate product_id as result, but it give me the incorrect result. The system give me the result DVD200 instead of DVD100. y?


Thanks in advance....


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 28 2003
Added on Dec 30 2002
10 comments
184 views