About CMP
843829Dec 30 2002 — edited Dec 31 2002Dear 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....