实体框架更新语句为 Firebird 生成无效 SQL
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我回顾了 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.