Yes

Alex Loubyansky wrote:

do you have a principalId as cmp and cmr at the same time?

alex

Thursday, October 17, 2002, 12:48:16 PM, you wrote:

k> Hi all,

k> I've the following problem:

k> I've mapped principals and roles in a 1..n relationship

k> When I try to add a role using:
k> roleHome.create( new RoleData(pPrincipalId, "caller_principal", k> "CallerPrincipal") );

k> I've the following error back

k> 08:53:40,972 ERROR [LogInterceptor] EJBException:
k> javax.ejb.EJBException: Creation Role failure: Could not create k> entity:java.sql.SQLException: ERROR: Attribute 'principalid' specified k> more than once

k> Since I'm already a newbie I can't figure out what this message means.

k> My cmr generated by xdoclet is:
k> for jboss:

k> <relationships>
k> <ejb-relation>
k> <ejb-relation-name>user-roles</ejb-relation-name>
k> <foreign-key-mapping/>

k> <ejb-relationship-role>
k> <ejb-relationship-role-name>role-has-user</ejb-relationship-role-name>
k> <key-fields/>
k> </ejb-relationship-role>
k> <ejb-relationship-role>
k> <ejb-relationship-role-name>user-has-role</ejb-relationship-role-name>
k> <key-fields>
k> <key-field>
k> <field-name>principalId</field-name>
k> <column-name>principalid</column-name>
k> </key-field>
k> </key-fields>
k> </ejb-relationship-role>
k> </ejb-relation>
k> </relationships>


k> Obviously if I don't use the relationship in my code I can add that role.




-------------------------------------------------------
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