Take a look at a little FAQ entry at http://www.jguru.com/faq/XDoclet,
"how can I write EJB 1.1 ejbs, etc".

Anyway you may find answers to some of your questions there, check it
first to make sure you're asking an unanswered question.

Cheers,
Ara.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:xdoclet-user-
> [EMAIL PROTECTED]] On Behalf Of Andrew Stevens
> Sent: Friday, February 01, 2002 10:48 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Xdoclet-user] EJB 1.1 CMP fields and PK class
> 
> A wise old hermit known only as Nortje, Andrew <[EMAIL PROTECTED]> once
> said:
> 
> > I am having trouble getting the PK classes to gen properly. I don't
> > think I am making the PK fields properly.
> >
> > I have a class called Contact with two Long's that serve as the PK
> > fields.
> > The PK class does not have these fields listed. Any help
appreciated.
> ...
> > This is what I have:
> ...
> >     /**
> >      * @ejb:pk-field
> >      * @ejb:persistent-field
> >      * @jboss:column-name="bid"
> >      */
> >     public Long ownerID;
> >     /**
> >      * @ejb:pk-field
> >      * @ejb:persistent-field
> >      * @jboss:column-name="contactID"
> >      */
> >     public Long contactID;
> 
> First, sorry for the slow answer (I was just clearing out some old
mail
> and realised I didn't see an answer to this one).
> 
> You're trying to do it wrong.  Rather than declaring the fields
yourself,
> you should declare abstract getters
> public abstract Long getOwnerID(); and
> public abstract Long getContactID();
> with the javadoc comments you had above.  XDoclet will generate the
field
> declarations itself in the ContactCMP subclass. (NB this is the way
you
> *must* do it for 2.0 CMP; with XDoclet, you write it the same way for
1.1
> or 2.0, and it takes care of the differences).
> 
> 
> Andrew.
> 
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to