0 Replies Latest reply on May 19, 2003 12:50 AM by peixubin

    foreign key relation 's problem

      I'm uing jboss3.0.6 and xdoclet1.1.2.

      JhLszBean.java:
      ...
      /**
      * This is a bi-directional one-to-many relationship CMR method
      *
      * @return the related ydxt.ejb.interfaces.YhdaLocal.
      *
      * @ejb.interface-method view-type="local"
      *
      * @ejb.relation
      * name="YD.YHDA-cmp20-PXB.JH_LSZ-cmp20"
      * role-name="PXB.JH_LSZ-cmp20-has-YD.YHDA-cmp20"
      *
      * @jboss.relation-mapping style="foreign-key"
      *
      * @jboss.relation
      * fk-constraint="true"
      * fk-column="HH"
      * related-pk-field="hh"
      *
      */
      public abstract ydxt.ejb.interfaces.YhdaLocal getYhda();
      ...
      YhdaBean.java:
      ...
      /**
      * This is a bi-directional one-to-many relationship CMR method
      *
      * @return a java.util.Collection of related ydxt.ejb.interfaces.JhLszLocal.
      * middlegen.plugins.entitybean.Entity20Table@566426
      * class middlegen.plugins.entitybean.Entity20Table
      * middlegen.plugins.entitybean.Entity20Table
      * @ejb.interface-method view-type="local"
      *
      * @ejb.relation
      * name="YD.YHDA-cmp20-PXB.JH_LSZ-cmp20"
      * role-name="YD.YHDA-cmp20-has-PXB.JH_LSZ-cmp20"
      *
      * @jboss.relation-mapping style="foreign-key"
      *
      */
      public abstract java.util.Collection getJhLszs();
      ...

      deploy it into jboss and test creating entity, the jboss throws SQLException (ORA-00957),
      the sql's string is " insert into (HH,....HH) values..." ,why is cmr field in these insert fields ?