Title: RE: [Xdoclet-user] Relationships to entities with compound PKs

Sorry. We are using XDoclet 1.1.2 and JBoss 3.0. But your solution worked perfectly anyway. We hadn't tried using multiple @jboss.relation tags.

Thanks,
Eric

> -----Original Message-----
> From: Aslak Helles�y [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 4:02 PM
> To: Eric McIntyre; XDoclet User mailing List (E-mail)
> Subject: RE: [Xdoclet-user] Relationships to entities with
> compound PKs
>
>
> I'm not sure I understand your question, nor do I know what
> app server or
> XDoclet version you're using.
>
> Just use several @jboss.relation or @weblogic.column-map or whatever
> app-server specific tag for each foreign key mapping. Example:
>
> /**
>  * @ejb.relation
>  *    name="blah"
>  *    role-name="grok-has-blah"
>  *
>  * @jboss.relation
>  *    fk-constraint="true"
>  *    fk-column="foo_id"
>  *    related-pk-field="fooId"
>  *
>  * @jboss.relation
>  *    fk-constraint="true"
>  *    fk-column="bar_id"
>  *    related-pk-field="barId"
>  */
> public abstract zap.interfaces.BlahLocal getBlah();
>
> Actually, the EJB PK isn't specified anywhere in these tags,
> so you don't
> have to worry about that.
>
> HTH,
> Aslak
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Eric McIntyre
> Sent: 18. november 2002 22:21
> To: XDoclet User mailing List (E-mail)
> Subject: [Xdoclet-user] Relationships to entities with compound PKs
>
>
> Is it possible for an entity bean to have a uni-directional 1..1
> relationship with another bean that has a compound PK? It
> appears that the
> foreign key mapping only expects one field. If this is
> possible, are there
> any details in the docs or examples anywhere?
> Eric McIntyre
>
>

Reply via email to