Sorry, but I can't figure out how to do:

my RoleBean.java is

// -------------------------------------------------------------------------
// Relations
// ------------------------------------------------------------------------- /**
* Returns a local User
* @return a local User
*
* @ejb.relation
* name="user-roles"
* role-name="role-has-user"
* multiple="no"
* cascade-delete="yes"
* * * @ejb.interface-method
* view-type="local"
* *
* @jboss.relation
* fk-constraint="true"
* related-pk-field="principalId"
* fk-column="principalid"
*/
public abstract UserLocal getUser();
/**
* Sets a collection of roles
* @param pRoles a collection of local Roles
*
* @ejb.interface-method
* view-type="local"
*/
public abstract void setUser( UserLocal pUser );



with
/**
* Retrieve the Role's principal's id.
*
* @return Returns name of this role's principal.
*
* @ejb.persistent-field
* @ejb.pk-field
*
* @jboss.column-name name="principalid"
**/
public abstract String getPrincipalId(); /**
* Sets the Role's principal's name.
*
* @param pPrincipalId The name of this User.
*
**/
public abstract void setPrincipalId(String pPrincipalId);


my Userbean.java is

/**
* Returns a Collection of local Roles
* @return a Collection of local Roles
*
* * @ejb.relation
* name="user-roles"
* role-name="user-has-role" * * * @ejb.interface-method
* view-type="local"
* * @jboss.relation-mapping
* style="foreign-key"
* */
public abstract java.util.Collection getRoles();
/**
* Sets a collection of roles
* @param pRoles a collection of local Roles
*
* @ejb.interface-method
* view-type="local"
*/
public abstract void setRoles( java.util.Collection pRoles );


The same for principalId

I can getRoles, but I really don't know how to create a new one.

I've searched in manuals and internet but I didn't found a reply.
Please help me Alex.



Alex Loubyansky wrote:

It must be either cmp or cmr but not both at the same time.

alex

k> Yes

k> Alex Loubyansky wrote:





-------------------------------------------------------
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to