refactor: ESPI 4.0 Schema Compliance - Phase 0: Fix Object-based entities #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements Phase 0 of ESPI 4.0 schema compliance, fixing
PnodeRefEntityandServiceDeliveryPointEntityto correctly extendObject(notIdentifiedObject) per the ESPI 4.0 XSD specification.Changes Made
Entity Updates
IdentifiedObjectinheritance, changed from UUID to Long IDIdentifiedObjectinheritance andmridfield, changed from UUID to Long ID@GeneratedValue(strategy = GenerationType.IDENTITY)for Long IDsMapper Updates
BaseIdentifiedObjectMapperinheritanceBaseIdentifiedObjectMapperinheritance, added ignore mappings for uuid and descriptionRepository Updates
JpaRepository<Entity, UUID>toJpaRepository<Entity, Long>Longinstead ofUUIDfor IDsDatabase Migration Updates
BIGSERIAL PRIMARY KEYBIGINT AUTO_INCREMENT PRIMARY KEYaggregated_node_refs.pnode_ref_idandusage_points.service_delivery_point_idFK columns to BIGINTTest Updates
Test Results
✅ All 550 tests passing (0 failures, 0 errors)
ESPI 4.0 XSD Compliance
Per ESPI 4.0 XSD specification:
Object, notIdentifiedObjectObject, notIdentifiedObject, has NO mRID fieldObject-based entities:
Files Changed
14 files changed: 234 insertions(+), 280 deletions(-)
Core Entity Files
PnodeRefEntity.javaServiceDeliveryPointEntity.javaPnodeRefMapper.javaServiceDeliveryPointMapper.javaPnodeRefRepository.javaServiceDeliveryPointRepository.javaMigration Files
V1__Create_Base_Tables.sql- Removed service_delivery_points tableV3__Create_additiional_Base_Tables.sql- Removed pnode_refs table, updated aggregated_node_refs FKdb/vendor/h2/V2__H2_Specific_Tables.sql- Added both tables with H2 syntaxdb/vendor/mysql/V2__MySQL_Specific_Tables.sql- Added both tables with MySQL syntaxdb/vendor/postgres/V2__PostgreSQL_Specific_Tables.sql- Added both tables with PostgreSQL syntaxTest Files
PnodeRefRepositoryTest.javaServiceDeliveryPointRepositoryTest.javaapplication-test.yml- Updated Flyway test configurationBreaking Changes
Migration Strategy:
Affected tables:
service_delivery_points- Changed from CHAR(36) to BIGINT, removed IdentifiedObject columnspnode_refs- Changed from CHAR(36) to BIGINT, removed IdentifiedObject columnsaggregated_node_refs- FK columnpnode_ref_idchanged to BIGINTusage_points- FK columnservice_delivery_point_idchanged to BIGINTRelated Issues
Closes #28 (Phase 0)
Checklist
🤖 Generated with Claude Code