Skip to content

EntityFrameworkCore Scaffolding: FbDatabaseModelFactory support for data type NUMERIC #1134

@bgrauer-atacom

Description

@bgrauer-atacom

The FbDatabaseModelFactory does not support NUMERIC datatype and uses DECIMAL as fallback. This can cause data precision loss.

Adding case

WHEN 1 THEN 'NUMERIC(' || (F.RDB$FIELD_PRECISION) || ',' || ABS(F.RDB$FIELD_SCALE) || ')'

to field type case 7, 8 and 16 should resolve this.


Additional notes:

  • Would it generally not be better to use the explicit case (2) for decimal and return '?' for default cases?
  • Precision and scale of DECIMAL data type are not returned. Intention?

Sources:

Metadata

Metadata

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions