错误“列c.CreatedOn不存在...".使用Devart dotConnect提供程序进行代码优先上下文初始化期间,PostgreSQL日志中的内容 [英] Error "column c.CreatedOn does not exist..." in PostgreSQL logs during code first context initialization using the Devart dotConnect provider

查看:80
本文介绍了错误“列c.CreatedOn不存在...".使用Devart dotConnect提供程序进行代码优先上下文初始化期间,PostgreSQL日志中的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当初始化上下文时,我的PostgresSQL日志中都会出现以下错误:

I'm getting the following error in my PostgresSQL logs whenever my context is initialized:

2014-06-03 09:51:25 PDT ERROR:  column c.CreatedOn does not exist at character 10
2014-06-03 09:51:25 PDT STATEMENT:  SELECT 

    c."CreatedOn"

    FROM "__MigrationHistory" AS c

    LIMIT 1 

大多数情况下,一切似乎都可以,但我想更好地理解该错误,并在可能的情况下使其消失.

Everything seems to work okay for the most part, but I'd like to better understand the error and make it go away if possible.

这是dotConnect提供程序的错误,还是我希望将此自定义列添加到我的__MigrationHistory表中?

Is this an error with the dotConnect provider or am I expected to add this custom column to my __MigrationHistory table?

推荐答案

在这种情况下,预计将出现"c.CreatedOn列不存在"异常.这是实体框架的内部逻辑.

The "column c.CreatedOn does not exist" exception is expected for this scenario. This is the internal logic of Entity Framework.

CreatedOn列仅在EF 4.3和更低版本中使用.但是,表"__MigrationHistory"以及"CreatedOn"列的内部检查仍然存在,因此,在更高版本的EF中,这会产生错误.但是,此请求的实现不会停止应用程序,也不会影响结果.

The CreatedOn column is used only in EF 4.3 and below. However, the internal check for the table "__MigrationHistory" and, accordingly, for the "CreatedOn" column still exists and, consequently, in the later EF versions this gives an error. However, the implementation of this request does not stop the application and does not affect the result.

这篇关于错误“列c.CreatedOn不存在...".使用Devart dotConnect提供程序进行代码优先上下文初始化期间,PostgreSQL日志中的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆