出现异常When a cmp-field and a cmr-field (relationship) are mapped to the same column, the setXXX method for the cmp-field may n
jbuilder+weblogic开发。两个表
一张用户信息表,主键userid,另外一张权限表,主键authid。其中用户信息表中的authtype是authid的外键。
权限表和用户信息表是1-多的关系,cmr为authtype,但是现在调用用户信息表的cmp的create方法,出现异常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.
查了许多资料,在EJB规范说:
during ejbCreate the instance cannot acquire a reference to the associated
entity object, and that reference is required by the set method.
In the ejbPostCreate method, on the other hand, the instance may reference
the associated entity object. Thus, a call to set can be made.
但是不知道该具体怎么做。。。请大家帮忙。。。