实体框架更新语句为 Firebird 生成无效 SQL

发布于 2024-10-31 01:05:35 字数 366 浏览 0 评论 0原文

我正在使用 Firebird 2.5.0 和实体框架,它运行良好。但是,最近我更改了一些内容(我推测),现在当我尝试保存更改时生成的 SQL 对 Firebird 无效:

update ( select [fields] from [table]) set [field] = @p0 where ([keyfieldn = @pn])

据我所知,Firebird 2.5.0 不支持此语法,并且当我尝试保存更改,但收到一条 SQL 错误,其中显示了同样多的内容(“令牌未知,第 8 列:(”)

我不确定现在要做什么。什么会导致 UpdateTranslator 实例生成此 SQL 而不是它的任何内容在我破坏它之前一定已经发电了吗?

I'm using Firebird 2.5.0 with the Entity Framework, which has been working well. However, recently I have changed something (I presume) and now the SQL that is being generated when I try to save my changes is not valid for Firebird:

update ( select [fields] from [table]) set [field] = @p0 where ([keyfieldn = @pn])

As far as I know, Firebird 2.5.0 does not support this syntax, and when I try to save changes I get back a SQL error that says as much ( "Token unknown, column 8: (" )

I'm not sure what to do now. What would cause the UpdateTranslator instance to generate this SQL instead of whatever it must have been generating before I broke it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

断桥再见 2024-11-07 01:05:35

我回顾了 edmx 文件,发现当我从数据库中提取一些新字段时,我得到了一些“DefiningQuery”元素。我找不到任何方法来访问界面中的这些设置,因此我只是从文件中删除了它们,它又可以正常工作了。

I went back through the edmx file and found that I had gotten some 'DefiningQuery' elements when I had it pull in some new fields from the database. I couldn't find any way to access those settings in the interface, so I just deleted them from the file and it is working correctly again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文