It's done. I also changed samples, CustomerBean.create returns Object,
PersonBean sets ejb:pk generate=3D"false", so no PersonPK is generated,
but CustomerPK is generated with all pk fields including pk fields of
parent PersonBean. I haven't tested it but I guess if you move ejbCreate
to PersonBean it'll also work and end up in CustomerHome.
Anyway I haven't tried to actually deploy samples on any app server,
please a kind contributor do that to make sure it actually deploys. I
also found some minor issues here and there and fixed them all.
> -----Original Message-----
> From: Rickard [mailto:rickard@...]
> Sent: Wednesday, December 19, 2001 9:20 AM
> To: Ara Abrahamian
> Cc: xdoclet-user@...
> Subject: Re: [Xdoclet-user] PK generation and create return value
> Ara Abrahamian wrote:
> > Well, I think a better solution is to abandon ejb:pk altogether and
> > at ejbCreate methods and their return type. Don't you think so?
> > So here is the algorithm:
> > - get the first ejbCreate method (assuming all ejbCreate methods
> > a single type)
> > - if ejb:pk generate=3D"false" -> use whatever the return type is, =
> > the pk type
> > - else -> generate the pk class (pk class name=3Dreturn type)
> > - now if generate=3D"true" and return type =3D
> > java.lang.Object/primitives/etc then generate pk class according to
> > <entitypk/> pattern param or ejb:pk class/package/etc attributes,
> > use return type as the pk class in ejb-jar.xml anyway.
> > As before ejb:pk generate is true by default, but priority is to
> > ejbCreate return type and then entitypk/ejb:pk class/ejb:pk package.
> Sounds good to me. Go ahead :-)
> Rickard =D6berg
> Chief Architect, TheServerSide.com
> The Middleware Company
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com