开发者

Control the way nhibernate does querying

开发者 https://www.devze.com 2022-12-21 13:18 出处:网络
I\'ve experienced a couple of days ago, that a problem with the name of the fields in the final query. It was a bug from a version before the 2.0.GA.

I've experienced a couple of days ago, that a problem with the name of the fields in the final query. It was a bug from a version before the 2.0.GA. To not drag too long on this, it was a problem when the query is too big, and you use SetMaxResults altogether. It got me a though: Would there any way to control how NHibernate is going to name y开发者_JAVA技巧our fields in the SQL query?

Because as I have seen for a while, and in this case more than ever, the relathionship between tables and the naming convention for the fields that will be rendered whit a not so pretty as I exaustly set on my criteria.


To directly answer your question, yes, you could implement an IInterceptor to change anything in the generated SQL. See this question.

However, that's very likely not the way to fix your problem...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号