本文介绍了Npgsql.NpgsqlException:column的类型为integer,但expression的类型为boolean Severity:ERROR代码:42804的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在nhibernate& postgresql

从sql迁移到postgres
postgres列类型中的
是整数但是在更新插入数据时它给出了错误

I have application in nhibernate & postgresql
migrating from sql to postgres
in postgres column type is integer but It gives error while update-insert data

[Property]
    [Column(1, Name = "is_deleted", SqlType = "INTEGER")]
    public virtual bool IsDeleted
    {
        get { return isDeleted; }
        set { isDeleted = value; }
    }



Npgsql.NpgsqlException:列is_deleted的类型为整数,但表达式的类型为boolean Severity:ERROR代码: 42804



我试图在app.config文件中映射列类型但不能正常工作...


Npgsql.NpgsqlException: column "is_deleted" is of type integer but expression is of type boolean Severity: ERROR Code: 42804

I have try to map column type in app.config file but not working...

<property name="query.substitutions">
       true 1, false 0
     </property>





建议一种方法来解决这个Map列类型boolean to integer ...



suggest a way to solve this Map column types boolean to integer...

推荐答案


这篇关于Npgsql.NpgsqlException:column的类型为integer,但expression的类型为boolean Severity:ERROR代码:42804的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 05:06