Conversation
Implements ESPI 4.0 schema compliance for AggregatedNodeRef (espi.xsd:1570-1601): Key Changes: - Changed ID from UUID to Long (extends Object, not IdentifiedObject) - Fixed PnodeRef relationship: @manytoone → @manytomany with join table (Per XSD line 1597: pnodeRef has minOccurs="0" maxOccurs="unbounded") - Moved table creation to vendor-specific V2 migrations (auto-increment) - Removed 13 non-indexed repository queries, kept only 2 indexed queries - Removed updateEntity mapper method (read-only operations) Entity Changes: - AggregatedNodeRefEntity: UUID id → Long id, PnodeRefEntity → List<PnodeRefEntity> - Added @manytomany join table: aggregated_node_ref_pnode_refs DTO Changes: - AggregatedNodeRefDto: PnodeRefDto → List<PnodeRefDto> - Updated all constructors and factory methods Database Changes: - Removed aggregated_node_refs from V3 (vendor-neutral) - Added to V2 MySQL/PostgreSQL/H2 with proper BIGINT AUTO_INCREMENT/BIGSERIAL - Added aggregated_node_ref_pnode_refs join table with composite primary key Tests: - Updated AggregatedNodeRefRepositoryTest with comprehensive test coverage - All 537 tests pass Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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