Skip to content

Generated VSAM entities' BigDecimal columns carry no precision/scale: Hibernate's default scale truncates V9(4) fields #3950

Closed

Description

@squid-protocol

Noticed while building the Cultural Gauntlet's part 3 (#3834, PR #3947).

What: the generated VSAM repository entities map packed and zoned decimal fields to BigDecimal, with no @Column(precision = …, scale = …). Hibernate's DDL default is precision 38, scale 2, so a PIC S9(5)V9(4) field stored through the generated schema loses its last two decimal places. The schema forge knows the exact precision (parse_pic_precision, and #3910's currency-aware version), but the entity doesn't carry it.

Fix: emit @Column(precision = <digits>, scale = <decimals>) from the same PIC precision the schema forge uses, for every BigDecimal field of the VSAM entities and DTOs.

Test: S9(5)V9(4) gives precision = 9, scale = 4; a currency-edited field uses #3910's precision; a round-trip through H2 keeps 4 decimals.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    schema
    legacy-modernization
    on Sep 28, 2026
  2. added 2 commits that reference this issue on Sep 28, 2026
  3. added
    status: pending-release
    on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglegacy-modernizationpriority: mediumschemastatus: pending-release

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions