EntityFramework6.Npgsql
EntityFramework6.Npgsql copied to clipboard
Mapping entity enums to numeric fields (int2, int4, int8) casues casts
When I map entity enums to numeric fields (int2, int4, int8) it casues the generated sql to contain casts from the correct value to the same.
For example a int2 column mapped to a enum based on a short becomes cast("C1" as int2) "C1" even if C1 already are of type int2
This affects both select and where statements, I haven't checked the case of joins. And I don't know if Postgres is smart enough to skip this cast if the column already are of the correct type?