You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert LineItem from UUID to Long ID with IDENTITY generation per ESPI 4.0
XSD (espi.xsd:1449). LineItem extends Object, not IdentifiedObject, requiring
Long ID with vendor-specific auto-increment syntax.
Changes:
- LineItemEntity: Change ID from UUID to Long with GenerationType.IDENTITY
- Add missing XSD fields: measurement (SummaryMeasurement), itemKind (required),
unitCost, itemPeriod (DateTimeInterval)
- LineItemRepository: Change from JpaRepository<LineItemEntity, UUID> to Long
- Remove 10 non-indexed queries, keep 2 indexed queries
- Create LineItemDto record matching XSD structure (no id/uuid fields)
- Create LineItemMapper interface with toDto/toEntity mappings
- Create SummaryMeasurementMapper for measurement field mapping
- LineItemRepositoryTest: Complete rewrite with comprehensive coverage
(CRUD, custom queries, relationships, business logic, persistence)
- Move usage_summaries + usage_summary_related_links tables from V3 to V2
vendor-specific migrations to maintain dependency order (line_items FK
requires usage_summaries to exist first)
- Fix UsageSummaryRepositoryTest to include required itemKind field
Database migrations:
- Add line_items table to V2 vendor-specific files with auto-increment
(BIGINT AUTO_INCREMENT for MySQL/H2, BIGSERIAL for PostgreSQL)
- Move usage_summaries from V3 to V2 (before line_items) to resolve
Flyway migration order issue
All 533 tests pass.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
0 commit comments