Hi Alec,
I can only find the following about PrimaryKey�s related to your question in the spec on page 203
---
10.8.2 Primary key that maps to multiple fields in the entity bean class
The primary key class must be coderanch, and must have a public constructor with no parameters.
All fields in the primary key class must be declared as coderanch.
The names of the fields in the primary key class must be a subset of the names of the container-managed fields.
(This allows the container to extract the primary key fields from an instance�s container-managed
fields, and vice versa.)
---
As I read it the bean provider does not have to supply setter and getters for the pk fields.
The only requirement is that the pk fields of the PrimaryKey class are public and that they match the names of container-managed persistent fields.
This also seems to be how the
JBoss 4.0 developers have read the spec. JBoss does not expect getter and setters on primary keys. JBoss only verifies that the fields are coderanch, have matching names with the container-managed persistent fields and that the hashCode and equals are implemented correctly and it will throw a run time error if the PrimaryKey does not have a default constructor with no arguments.
Kind regards
Christian