feature request #8464
open
- Copied from task #7099: Make CdmAuthority a persistable class added
- Related to task #7100: Split CdmAuthority into operations and filters added
- Target version changed from CDM UML 5.15 to CDM UML 5.8
- Target version changed from CDM UML 5.8 to CDM UML 5.15
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.
Maybe this is a simple index size problem. During an import I got
20:20:05,140 ERROR SchemaExport:484 - HHH000389: Unsuccessful: alter table Authority add constraint UKr4d50pph1jg53wdxl7pxp8bmp unique (property, permissionClass, targetUuid, operations)
20:20:05,140 ERROR SchemaExport:485 - Specified key was too long; max key length is 1000 bytes
We need to try if with smaller column sizes it works.
- Related to bug #9058: Hibernate loggs error when creating schema on MySQL due to failing index creation added
In #9058 a very similar problem was solved. For doing the same thing for this index (which is a unique index not a simple index as in #9058) will require to
- reduce the size of the columns to the required size (maybe we can also reduce the key's size for the enumerations)
- define a new uniqueIndexExporter with prefix indexing as in #9058 for multiple columns if the size is still too large
Needs discussion on what the better solution is.
- Target version changed from CDM UML 5.15 to CDM UML 5.42
Also available in: Atom
PDF