In a one to many relationship, I want to have many side to be a collection and have get and set for that in the dataobject. I also want to have bulk accessors I am trying the following;
In parent bean
/**
* @ejb:interface-method view-type="local"
*/
public abstract void setChildren(java.util.Collection children);
/**
* @return all children for this parent.
* @ejb:interface-method view-type="local"
* @ejb:relation
* name="parent-child"
* role-name="parentf-has-many-children"
* multiple="yes"
*/
public abstract java.util.Collection getChildren();
/**
* bulk accessor.
* @ejb:interface-method view-type="local"
*/
public abstract void setData(ParentData data);
/**
* Generated bulk accessor.
*
* @ejb:interface-method
* @ejb:transaction type="Required"
*/
public abstract ParentData getData();
On the child side, I have,
/**
* @ejb:interface-method view-type="local"
* @ejb:relation
* name="parent-child"
* role-name="many-children-have-one-parent"
*@jboss:relation
* name="parent-child"
* key-column="childId"
* foreign-key-column="parentId"
*
*/
public abstract ParentLocal getParent();
/**
* @ejb:interface-method view-type="local"
*/
public abstract void setParent(ParentLocal param);
My problem is that the setChildren and getChildren methods are not generated
in the ParentData object. Is this the correct way to do this ?
Microsoft Word Picture
Description: application/microsoft-ole-object
