marcelo-ferraz
marcelo-ferraz

Reputation: 3257

Control the way nhibernate does querying

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 your 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.

Upvotes: 0

Views: 115

Answers (1)

Mauricio Scheffer
Mauricio Scheffer

Reputation: 99720

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...

Upvotes: 1

Related Questions