[ 
https://issues.apache.org/jira/browse/OFBIZ-5905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14242595#comment-14242595
 ] 

Gareth Carter commented on OFBIZ-5905:
--------------------------------------

createPartyRole has permission checking whereas ensurePartyRole does not, 
changing this will slightly change the behaviour. I am not entirely sure if 
this would be correct. Obviously creating a party relationship requires the 
party roles to exist in the database because of referential integrity. Why do 
we need permissions around creating roles if roles are required to exist in 
PartyRole for other entities, is the PartyRole entity only for referential 
integrity or used in other ways aswell?

> Change createPartyRelationshipAndRole to use ensurePartyRole
> ------------------------------------------------------------
>
>                 Key: OFBIZ-5905
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5905
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: Trunk
>            Reporter: Gareth Carter
>            Priority: Minor
>
> createPartyRelationshipAndRole in party/servicedef/services.xml invokes 
> createPartyRole and then createPartyRelationship. It would be better if 
> createPartyRole was changed to ensurePartyRole so that 
> createPartyRelationshipAndRole can be called without the risk of a duplicate 
> key error in PartyRole



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to