You don't have to use jboss:target-relation in this case.

As to your problem, use column-name attribute in jboss:relation tag to correctly map 
foreign key
fields.

alex

Friday, November 15, 2002, 3:34:47 PM, you wrote:

PVvpig> Hi all,

PVvpig> i am using two entity beans (DpProfile222, DpDealingPart222) with a
PVvpig> one-to-many bi-directional relation between them :
PVvpig> DpProfile222 has many DpDealingPart222s. These relations are based on
PVvpig> xdoclet and for each entity are:

PVvpig> a) DpProfile222 
PVvpig>    /**
PVvpig>     * @ejb:interface-method view-type="local"
PVvpig>     * @ejb:relation name="xmi_251" role-name="theDpProfile"
PVvpig>     *
PVvpig>     * @jboss:target-relation fk-column="DP_PROFILE_ID"
PVvpig> related-pk-field="dpProfileId"
PVvpig>     */
PVvpig>     public abstract Collection getDealingParts();
PVvpig>    /**
PVvpig>     * @ejb:interface-method view-type="local"
PVvpig>     */
PVvpig>     public abstract void setDealingParts(Collection dealingParts);

PVvpig> b) DpDealingPart222
PVvpig>    /**
PVvpig>     * @ejb:interface-method view-type="local"
PVvpig>     * @ejb:relation name="xmi_251" role-name="thedealingParts"
PVvpig> target-multiple="yes"
PVvpig>     *
PVvpig>     * @jboss:relation fk-column="DP_PROFILE_ID"
PVvpig> related-pk-field="dpProfileId"
PVvpig>     */
PVvpig>     public abstract DpProfile222Local getDpProfile222();
PVvpig>    /**
PVvpig>     * @ejb:interface-method view-type="local"
PVvpig>     */
PVvpig>     public abstract void setDpProfile222(DpProfile222Local bean);


PVvpig> Everything works fine, but when i try to create DealingPart222 JBoss
PVvpig> responds : "...Duplicate column name..."

PVvpig> Thanks in advance

PVvpig> Vassilis Petropoulos
PVvpig> Athens, Greece


-- 
Best regards,
 Alex Loubyansky




-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to