Project

General

Profile

feature request #8464

Make AuthorityBases unique

Added by Andreas Müller about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
New
Category:
cdm
Target version:
Start date:
08/14/2019
Due date:
% Done:

0%

Severity:
normal
Tags:

Description

The old GrantedAuthorityImpl.authority was unique and NotNull. This was forgotten to implement when implementing CdmAuthority and Role (AuthorityBase) in #7099.
Needs to be done or to be discussed (see #4922).

Maybe also #7100 needs to be considered.

https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/WorkshopRightsAndRoles2017-11


Related issues

Related to Edit - task #7100: Split CdmAuthority into operations and filters New 11/30/2017
Related to Edit - feature request #4922: GrantedAuthorities not reusable anymore New 05/21/2015
Copied from Edit - bug #7099: Make CdmAuthority a persistable class Resolved 11/30/2017

Associated revisions

Revision 20ffe9b7 (diff)
Added by Andreas Müller about 1 month ago

ref #7099 , ref #8464 some adaptions on constraints for CdmAuthority

History

#1 Updated by Andreas Müller about 1 month ago

  • Copied from bug #7099: Make CdmAuthority a persistable class added

#2 Updated by Andreas Müller about 1 month ago

  • Related to task #7100: Split CdmAuthority into operations and filters added

#3 Updated by Andreas Müller about 1 month ago

#4 Updated by Andreas Müller about 1 month ago

  • Tags set to permission

#5 Updated by Andreas Müller about 1 month ago

  • Target version changed from CDM UML 5.10 to CDM UML 5.8

#6 Updated by Andreas Müller about 1 month ago

  • Target version changed from CDM UML 5.8 to CDM UML 5.10

This seems to be more difficult then I thought.

In general hibernate allows the ,uniqueConstraints=@UniqueConstraint(columnNames={"xxx"})" attribute on java.persistence.Table. This also works on ordinary tables with multiple columns (I tested on FeatureState).

But CdmAuthority uses the table from the base class AuthorityBase. Therefore it uniqueConstraints needs to be defined there. This also works if only 1 column is defined. It does not work with multiple columnNames for some reason. I also tried to remove all other constraints with no effect.

This requires further investigation.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)