Skip to content

NUMERIC column handling is incorrect, should not produce decimal #8

@JasonTashtego

Description

@JasonTashtego

NUMERIC and DECIMAL cannot be treated the same here. You have to consider both the scale and the size of the NUMERIC to produce the correct type and then generate it for the language.

NUMERIC columns with scale = 0 are integer types. Further, NUMERIC with size > 10, implies a Long (64-bits) in most languages.

This is the entity field currently produced (incorrectly) when pointed at an integer (5-digit) numeric, scale = 0, column.

oabqr : decimal { @dbname(OABQR) @dbtype("NUMERIC(5)") @DbDefaultValue(0) @NotNull @notempty @SiZe(5) };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions