[
https://issues.apache.org/jira/browse/OFBIZ-5980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jacques Le Roux reopened OFBIZ-5980:
------------------------------------
Hi Pierre,
I reopen because I found a small issue and a bigger one:
small: description="RoleTypes associated to a Party"> should not be written
this way
bigger: if you look in log you will see a lot of errors like
{noformat}
2021-11-06 10:23:45,057 |OFBiz-batch-2 |DatabaseUtil
|E| SQL Exception while executing the following:
ALTER TABLE OFBIZ.BILLING_ACCOUNT_ROLE ADD CONSTRAINT BILLACCT_RL_PTRL FOREIGN
KEY (PARTY_ID, ROLE_TYPE_ID) REFERENCES OFBIZ.PARTY_ROLE (PARTY_ID,
ROLE_TYPE_ID)
Error was: java.sql.SQLException: Constraint 'BILLACCT_RL_PTRL' is invalid:
there is no unique or primary key constraint on table '"OFBIZ"."PARTY_ROLE"'
that matches the number and types of the columns in the foreign key.
java.sql.SQLException: Constraint 'BILLACCT_RL_PTRL' is invalid: there is no
unique or primary key constraint on table '"OFBIZ"."PARTY_ROLE"' that matches
the number and types of the columns in the foreign key.
{noformat}
I guess it's because all relations like BILLACCT_RL_PTRL miss the fromDate PK
TIA
> Have the ability to revoke (expire) roles of a party
> ----------------------------------------------------
>
> Key: OFBIZ-5980
> URL: https://issues.apache.org/jira/browse/OFBIZ-5980
> Project: OFBiz
> Issue Type: Improvement
> Components: party
> Affects Versions: Trunk
> Reporter: Pierre Smits
> Assignee: Pierre Smits
> Priority: Major
> Labels: roles
> Fix For: Upcoming Branch
>
>
> Currently it only possible to delete a role.
> Which can lead to potential error messages, when a particular role is
> associated with records where the roleTypeId is used as a foreign key in the
> entity-model/database and the user tries to delete that role from the list.
> In order to avoid such, it is better to revoke the PartyRole record by
> setting an expiration date (end date) on the record.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)