refactor: Phase 9 - AggregatedNodeRef ESPI 4.0 schema compliance #75
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
Implements ESPI 4.0 schema compliance for AggregatedNodeRef (espi.xsd:1570-1601).
This phase addresses a critical XSD compliance issue: per ESPI 4.0 XSD line 1597,
pnodeRefhasminOccurs="0" maxOccurs="unbounded", requiring support for 0 to many pricing node references.Key Changes
1. ID Type Migration
UUIDtoLong(AggregatedNodeRef extends Object, not IdentifiedObject)GenerationType.IDENTITYwith vendor-specific auto-increment2. PnodeRef Relationship Fix (XSD Compliance)
@ManyToOne- single PnodeRefEntity@ManyToMany- Listaggregated_node_ref_pnode_refs3. Database Schema
aggregated_node_refstable from V3 to vendor-specific V2 migrationsaggregated_node_ref_pnode_refsjoin table with:(aggregated_node_ref_id, pnode_ref_id)4. Repository Optimization
findAllIds()- All IDsfindAllByUsagePointId()- By usage point (foreign key index)5. Mapper Simplification
updateEntitymethod (read-only operations)pnodeRef↔pnodeRefsFiles Changed
Entity & Domain:
AggregatedNodeRefEntity.java- Long ID, List with @manytomanyDTO:
AggregatedNodeRefDto.java- List for XML marshallingAggregatedNodeRefsDto.java- Updated factory methodsMapper:
AggregatedNodeRefMapper.java- Removed updateEntity, updated field mappingsRepository:
AggregatedNodeRefRepository.java- Long ID, 2 indexed queries onlyDatabase Migrations:
V3__Create_additiional_Base_Tables.sql- Removed aggregated_node_refsV2__MySQL_Specific_Tables.sql- Added aggregated_node_refs + join tableV2__PostgreSQL_Specific_Tables.sql- Added aggregated_node_refs + join tableV2__H2_Specific_Tables.sql- Added aggregated_node_refs + join tableTests:
AggregatedNodeRefRepositoryTest.java- Comprehensive test coverage for List relationshipsTest Results
✅ All 537 tests pass
Test Plan
🤖 Generated with Claude Code