| Summary: | MaxDB: size of compound key of the entity TelephoneNumber exceeds MaxDBs limit | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Adrian Goerler <adrian.goerler> | ||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | eclipselink.orm-inbox, krum.tsvetkov, sabine.heider | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | test maxdb | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 284657 | ||||||||
| Attachments: |
|
||||||||
Created attachment 180206 [details]
patch limiting the size of the primary key
This patch solves failures of the following tests:
EntityMappingsMergeInheritedJUnitTestCase.
testOneToManyRelationships,
testVerifyOneToManyRelationships,
testMappedSuperclassTransientField,
testTransientField and
testDeleteBeerConsumer.
Tested on MaxDB. Reviewed by Tom. Checked in at #8312. Need to reopen this ticket. The same issue occurs with the entities org.eclipse.persistence.testing.models.jpa.ddlgeneration.CKeyEntityA, CKeyEntityB and CKeyEntityC. Here, the issue is even more pronounced: There is a join table relationshsip between CKeyEntityB and CKeyEntityC. The primary key of the join table is the full row, which is composed of the PKs of CKeyEntityB and CKeyEntityC. This effectively limits the sums of the widths of the PKs of CKeyEntityB and CKeyEntityC to 1024 bytes on MaxDB. Nevertheless, the test suite does not seem to test for the maximum length of the PKs. Hence, I am suggesting to adjust the length of the PK components. Additional, the maximum PK size needs to be documented as a limitation. Created attachment 180245 [details]
limit the size of the primary key of entities CKeyEntity[A|B|C]
Comment on attachment 180245 [details]
limit the size of the primary key of entities CKeyEntity[A|B|C]
Fixes issues with the tests
DDLGenerationJUnitTestSuite
.testDDLUniqueKeysAsJoinColumns
.testDDLUnidirectionalOneToMany
.testManyToManyWithMultipleJoinColumns
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
The entity org.eclipse.persistence.testing.models.jpa.xml.merge.inherited.TelephoneNumber has a compound key: public class TelephoneNumberPK { public String type; protected String number; private String areaCode; ... } The length of the string components default to 255 each giving a total length of the primary key of 765 unicode characters or 1530 bytes. This exceeds MaxDB's limit of 1024 for the "Total of internal lengths of all columns belonging to an index". The purpose of the model class TelephoneNumber seems to be to test overriding of a mapping defined in a superclass by XML. Hence, I think the test would not be spoiled by limiting the length of the primary key columns.