Quote from specs page 203, 10.8.1:
The Bean Provider uses the primkey-field element of the deployment descriptor to specify the container-managed field of the entity bean class that contains the primary key. The field�s type must be
the primary key type.
This means, if a cmp-field is also a primkey-field then it cannot be primitive type (because a primary key has to be an object). Is it correct ?
Googled and got the answer:
The cmp-field used as simple primary key can be primitive as long as it is possible for the container to convert it to its specified Wrapper type.
[ UD: removed link to copyrighted material ]
[ December 20, 2005: Message edited by: Sankar Subbiramaniam ]
[ August 03, 2007: Message edited by: Ulf Dittmer ]