是的,没有外键关联,EJB的关联是不认的!

解决方案 »

  1.   

    EJB的关联倒底是怎么着,我老是不明白,一对一的双向关系两个表的关系怎么设置呢?
      

  2.   

    javax.ejb.EJBException: [EJB:010145]When a cmp-field and a cmr-field (relationship) are mapped to the same column, the setXXX method for the cmp-field may not be called. The cmp-field is read-only.
    两个表建立了关联,往有外键的表中插入数据时出现了上面的错误,如果我把关联删掉就不会出现错误,这是为什么呢?