Entity Beans without a primary key
Hi,
I am using Sun One Studio 5 with Sun One Applcation server 7.0. And I want to know :
Is it possible to develop an entity bean without a primary key?
If I want to set the relation ship between two entity beans (ex: one-to-many). And I don't want one of the entity bean in the relation ship to have primary key. Is it possible?
Thank you.
[404 byte] By [
Aimreddy] at [2007-11-25 10:20:03]

An entity bean represents data in a database. It is best to create primary key fields in the Entity Bean wizard of Sun one studio, because the wizard also creates a findByPrimaryKey method, and if necessary a primary key class, and sets up the basic functionality for you.
If you do not create a real primary key field, but take the default field the wizard creates for you, the wizard will not create the primary key class.
Hope this helps.