In the application I'm developing, I am using NHibernate as ORM. My app has to support SQL Server, and MS Access (I'm using the NHibernate JetDriver).
Now, the thing is that I have a certain query which I cannot achieve using HQL or the ICriteria API; so, I'm using an ISQLQuery for that one.
Now, what bothers me, is that it seems that NHibernate is parsing the native SQL query as well, and thereby changing the SQL code of that query. It seems that the specific Driver implementation is called, and my query is parsed; and in the case of the JetDRiver, the query is being modified by NHibernate which results in a query that is unexecutable.
So, why is it that NHibernate changes my native SQL queries ?