There is a problem when the int is nullable on GetHashCode
At the point of GetHashCode on ActiveRecord.tt there is a need for a nullable check. Something like this.
<#
if(tbl.PK.SysType=="int" && !tbl.PK.Nullable ){
#>
public override int GetHashCode() {
return this.<#=tbl.PK.CleanName #>;
}
<# }#>
(update) This value can be come null on the Views. I have include the views using this code I found on inet.
const string TABLE_SQL=@"SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE='BASE TABLE'
union
select Table_catalog, table_schema, table_name, 'View' table_type
from information_schema.views";
After that, this error appears.