Suppose i have a table named purchase_order(po_id,item_id,po_date,desc,...) in this i am assuming that i have a composite primary key (po_id,item_id). Whether this kind of composite primary key the entity bean support. What i am asking is in ejbFindByPrimaryKey method is returning only an object. Whether this is possible or i have to normalize the table.
What is your suggestion.
Thanks
Vinay Raj
Ranch Hand
Joined: Jun 19, 2006
Posts: 81
posted
0
Composite primary keys are supported in entity beans. You will have to define a class which holds all the attributes of the primary key. For details regarding the rules to be followed in defining such a key refer EJB specifications.
Mahendran Aiyappan
Ranch Hand
Joined: Sep 05, 2005
Posts: 102
posted
0
Thank you for kind idea
But sorry sir I don't know where EJB Specification. Can you provide me the exact link and if any examples would be marvalous.
Once again Thanks
Vinay Raj
Ranch Hand
Joined: Jun 19, 2006
Posts: 81
posted
1
Refer link for EJB specifications. A sample JBoss example is available at this link. Dude you can get this info on google.
Mahendran Aiyappan
Ranch Hand
Joined: Sep 05, 2005
Posts: 102
posted
1
Thank you very much sir that example is very useful to me.