I have a 1:N relation between two entities and it tries to insert a NULL
value for the CMR field.
Here is a sample code between User and UserMailBoxMap(UserId is foreign
key here). All my relationships have the same problem. I would really
appreciate if someone could help me out.
UserBean
/**
* Returns a collection of UserMailBoxMapLocal
*
* @return a collection of related UserMailBoxMapLocal
* @ejb.interface-method
* view-type="local"
* @ejb.relation
* name="usermailboxmap-user"
* role-name="UserMailBoxMap-maps-mailbox-to-User"
* target-ejb="UserMailBoxMap"
* target-role-name="user-can-have-multiple-mailbox"
* @weblogic.target-column-map
* foreign-key-column="c_userid_fk"
* @jboss:target-relation
* related-pk-field="userId"
* fk-column="c_userid_fk"
*/
public abstract java.util.Collection getUserMailBoxMap();
/**
* Sets a collection of related UserMailBoxMapLocal
*
* @param a collection of related UserMailBoxMapLocal
* @ejb.interface-method
* view-type="local"
* @param userMailBox the new CMR value
*/
public abstract void setUserMailBoxMap(java.util.Collection
userMailBox);
UserMailBoxMap Bean
/**
* Returns the related UserLocal
*
* @return the related UserLocal
* @ejb.interface-method
* view-type="local"
* @ejb.relation
* name="usermailboxmap-user"
* role-name="user-can-have-multiple-mailbox"
* @weblogic.column-map
* foreign-key-column="c_userid_fk"
* @jboss.relation
* fk-column="c_userid_fk"
* related-pk-field="userId"
*/
public abstract com.postx.common.interfaces.UserLocal getUser();
/**
* Sets the related userLocal
*
* @param ContentLocal the related contentLocal
* @ejb.interface-method
* view-type="local"
* @param user the new CMR value
*/
public abstract void setUser(com.postx.common.interfaces.UserLocal
user);
I use setUser(user) in ejbPostCreate.
Thanks
shankar
-------------------------------------------------------
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