Hello 1> What is the use of Primary Key Class in CMP or BMP?
2> It is observed from my side that If Primary Key is a single field Primary Key then without putting a ".class" of primary key class in jar also EJB works fine.but for composite primary key i desperately required it?
Can anybody focus more on this?
Thanks in Advance
Joined: Sep 09, 2004
When I use a single field as primary key, I do not use a Primary key class.
As you stated, with a complex primary key (more than one field) you must use a primary key class.
You may alway use a primary key because - design purpose (consistent use of pk classes or wanting to seperate primary key and fields used for primary key) - auto - increment for some EJB containers when you want to use unknown pk
Things get always more complicated as expected.<br />Author of eBook Hibernate 3 Developer Guide by example<br />Tutorials about Hibernate, EJB, Struts, JSF <a href="http://www.laliluna.de" target="_blank" rel="nofollow">www.laliluna.de</a>