Dan,

Thanks for the help.  I did not realize that rule (b) was no
longer in the spec.  That helps for "java.lang.Integer".

However, I still am not clear on whether "int" is a valid
PK type.  If not, I think it ought to be.

<vendor>
Our product supports either "int" or "Integer" as a PK type,
as well as all other primitive or primitive wrapper types.
</vendor>

It is not clear to me if this is compliant or not with the
EJB 1.1 specification.  Should only primitive wrappers be
allowed.  And if so, is this sensible, given again that
"int", in Java, means essentially "non-null Integer", which
is a pretty reasonable type for a primary key field.

-jkw

Dan OConnor wrote:
>
> On 21 Apr 00, at 11:57, Jonathan K. Weedon wrote:
>
> Hi Jonathan,
>
> > b) For CMP, primary keys must have a default constructor.
> > This precludes using "java.lang.Integer" as a primary key
> > type.
>
> I think this requirement is only for a primary key that maps to
> multiple fields in the entity bean class.  Clearly, java.lang.Integer
> falls under the category of primary keys that map to single fields in
> the entity bean class.  See 9.4.7.1 vs. 9.4.7.2.
>
> >
> > c) Primary Key wrapper classes for single field primary
> > keys are deprecated in EJB 1.1.  This precludes using a
> > class FooPK as a primary key type.
>
> Where is this deprecated?  I was unable to find it in the
> specification, although I may have missed it.  Could you point me
> to the section?
>
> >
> > Thus, according to the EJB specification, there is no way
> > to have a number as a primary key type.
>
> I don't think this is the specification's intent.
>
> -Dan
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to