Your XDoclet tags look correct. I've used the exact same tags without any problem.
What is the exact output from the error message you are getting?
Also, in your data schema, make sure you have a POSTAL_DEPOT_KEY column defined in the
table for PackageBean. WebLogic will use this to map the foreign key relationship
between PackageBean and PostalDepotBean.
- Adam
-----Original Message-----
From: Hall, Simon {IeS eTech} [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 9:35 AM
To: '[EMAIL PROTECTED]'
Subject: [Xdoclet-user] Many to 1 Unidirection Relationship
Hello,
I've tried several different combinations of tags to generate a many to 1
unidirectional relationship, but can't get it.
Say I have a two beans, a PackageBean and a PostalDepotBean, and many packages can
belong to one Depot. So I want the PackageBean to know which DepotBean it belongs to
but don't want the DepotBean to know which packages belong to it.
The following is what I curently have as the relationship declaration in the
PackageBean
/**
* @return the postal depot for this package
* @ejb:interface-method view-type="local"
* @ejb:relation
* name="package-postalDepot"
* role-name="one-package-belongs-to-one-postalDepot "
* target-role-name="one-postalDepot-has-many-packages"
* target-ejb="PostalDepot"
* target-multiple="yes"
*
* @weblogic:column-map
* foreign-key-column="POSTAL_DEPOT_KEY"
* key-column="POSTAL_DEPOT_KEY"
*/
public abstract PostalDepotLocal getPostalDepot();
/**
* @param postalDepot the postal depot for this package
* @ejb:interface-method view-type="local"
*/
public abstract void setPostalDepot(PostalDepotLocal postalDepot);
POSTAL_DEPOT_KEY is the primary key of the PostalDepotBean.
This does not work as xdoclet complains that I need a primary key column called
POSTAL_DEPOT_KEY in the PackageBean.
How do I define the PackageBean as the 'many' side of the relationship?
Thanks
Simon Hall
mob: 077 4877 2134
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user