I believe that an XDoclet (1.2B3) bug exists in the generation of the
Weblogic(7.0/8.1) CMP deployment descriptor for the case of a 1-1
bidirectional cmr field.
However, being a relative newbie to XDoclet and Weblogic, I could be
wrong. Could easily be pilot error.
In any case, when I modify the following DD snippet manually from
<weblogic-rdbms-relation>
<relation-name>AlarmMessageRelation</relation-name>
<weblogic-relationship-role>
<relationship-role-name>Alarm-has-a-Message</relationship-role-name>
<relationship-role-map>
<column-map>
<foreign-key-column>message_id</foreign-key-column>
<key-column>message_id</key-column>
</column-map>
</relationship-role-map>
</weblogic-relationship-role>
</weblogic-rdbms-relation>
to
<weblogic-rdbms-relation>
<relation-name>AlarmMessageRelation</relation-name>
<weblogic-relationship-role>
<relationship-role-name>Alarm-has-a-Message</relationship-role-name>
<relationship-role-map>
<column-map>
<foreign-key-column>message_id</foreign-key-column>
<key-column>message_id</key-column>
</column-map>
</relationship-role-map>
</weblogic-relationship-role>
<weblogic-relationship-role>
<relationship-role-name>Message-has-an-Alarm</relationship-role-name>
<relationship-role-map>
<column-map>
<foreign-key-column>alarm_id</foreign-key-column>
<key-column>alarm_id</key-column>
</column-map>
</relationship-role-map>
</weblogic-relationship-role>
</weblogic-rdbms-relation>
the expected behavior from the beans is seen, i.e. the DB shows the
1:1 relationship when viewing both the Alarm and Message tables after
the client code runs. Without the patch, the alarm_id link in the
Message table does not get set (remains null).
The relevent XDoclet snippets are:
AlarmBean:
/**
* Return the Message bean associated with this Alarm.
*
* @return the Message bean associated with this Alarm.
*
* @ejb.interface-method view-type="local"
*
* @ejb.relation
* name="AlarmMessageRelation"
* role-name="Alarm-has-a-Message"
*
* @weblogic.column-map
* foreign-key-column="message_id"
* key-column="message_id"
*/
public abstract Message getMessage();
MessageBean:
/**
* Return the Alarm bean associated with this Message bean.
*
* @ejb.interface-method
*
* @ejb.transaction type="Required"
*
* @ejb.relation
* name="AlarmMessageRelation"
* role-name="Message-has-an-Alarm"
*
* @weblogic.column-map
* foreign-key-column="alarm_id"
* key-column="alarm_id"
*/
public abstract Alarm getAlarm();
I'm looking for validation or refutation that I have encountered a
bug. If it is a bug, a workaround would be nice.
Thanks,
-pmr
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user