在nhibernate中,当我提交我的事务时,sql update语句不会显示在控制台中。(In nhibernate, when I commit my transaction, the sql u

编程入门 行业动态 更新时间:2024-10-23 13:25:48
在nhibernate中,当我提交我的事务时,sql update语句不会显示在控制台中。(In nhibernate, when I commit my transaction, the sql update statements don't show in the console. Why?)

我有点恼火的是,当我提交我的事务时,更新语句没有在我的nhibernate应用程序的控制台中显示。

我在配置文件中使用show_sql = true。 据我所知,所有的select语句都显示出来了。 当我不使用交易时,更新也会显示。

有人曾经发生过这种事吗? 我该如何解决?

谢谢!

I'm getting a little annoyed that the update statements don't show in the console in my nhibernate application when I commit my transactions.

I'm using show_sql = true in the config file. As far as I can tell all the select statements are showing. Updates also show when I'm not using transactions.

Has anyone had this happen to them before? How can I fix it?

Thanks!

最满意答案

答案是这里NHibernate没有显示启用ShowSql的Update查询

只需使用此配置:

<property name="adonet.batch_size">0</property>

The answer is here NHibernate not showing Update queries with ShowSql enabled

Just use this config:

<property name="adonet.batch_size">0</property>

更多推荐

本文发布于:2023-08-05 08:00:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1430229.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:当我   控制台   语句   事务   update

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!