nhibernate / nhibernate-core

NHibernate Object Relational Mapper
https://nhibernate.info
GNU Lesser General Public License v2.1
2.11k stars 921 forks source link

ScaleDefined is not set by SqlType ctor #3523

Closed gliljas closed 2 months ago

gliljas commented 2 months ago
public SqlType(DbType dbType, byte precision, byte scale)
{
    this.dbType = dbType;
    this.precision = precision;
    this.scale = scale;
    precisionDefined = true;
}

public SqlType(DbType dbType, byte scale)
{
    this.dbType = dbType;
    this.scale = scale;
    ScaleDefined = true;
}

As you can see, ScaleDefined is not set by the upper ctor, even though it's most definitely set.

fredericDelaporte commented 2 months ago

The "NoMs" versions are a legacy thing from my viewpoint. Using scale instead of numerous types is better.