Hi All,
The EJB specs says that for an entity bean, the fully qualified package name of the primary key class is to be specified in the <prim-key-class> element in the ejb-jar.xml. I didn't find any other way to mention the primary key in ejb-jar.xml. Suppose I've two String variables in an entity bean, one of which is it's primary key. In this case how the container will identify which field is actually the primary key. In case of CMP the <primkey-field> is there exactly for this purpose. Though in case of BMP, I don't think it's at all a requirement for the container 'cause the container doesn't generate the database access code,
still it strikes me. Is this one of the reasons behind the say,-always wrap the primary key with ur own class ?
Comments will be appriciated
-
Identification of Primary Key in BMP (1 messages)
- Posted by: Arindam Chandra
- Posted on: October 18 2000 11:12 EDT
Threaded Messages (1)
- Identification of Primary Key in BMP by Dave Wolf on October 19 2000 12:12 EDT
-
Identification of Primary Key in BMP[ Go to top ]
- Posted by: Dave Wolf
- Posted on: October 19 2000 12:12 EDT
- in response to Arindam Chandra
You return the Primary key instance in the ejbCreate() which is how the container knows.
Dave Wolf
Internet Applications Division
Sybase