[ https://issues.apache.org/jira/browse/OFBIZ-5905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14259207#comment-14259207 ]
Nicolas Malin commented on OFBIZ-5905: -------------------------------------- I check the service's definition and it's strange because it use a group to call createPartyRole and createPartyRelationship. But the createPartyRole search a partyId and roleTypeId in the context and createPartyRelationship partyIdFrom, roleTypeIdFrom and partyIdTo, roleTypeIdTo. To improvement sur buisness framework I propose : * Convert createPartyRole to ensurePartyRole * Add description ont the service because it's mistaking to have a service with different field * Add a new service createPartyRelationshipAndRoles that call ** ensurePartyRoleFrom (new service) ** ensurePartyRoleThru (new service) ** createPartyRelationship what do you means for that ? > 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)