Well, if you use LINQ, you can get the generated SQL from it, 
see 
http://weblogs.asp.net/ricardoperes/getting-the-sql-from-a-linq-query-in-nhibernate.
 
Then write an assertion to check if the SQL contains/does not contain 
something.

RP

On Monday, January 19, 2015 at 3:34:43 PM UTC, Trinition wrote:
>
> I've encountered what I believe to be a bug in NHibernate 
> <https://nhibernate.jira.com/browse/NH-3375#comment-27056> (perhaps 
> Hibernate, too).  I submitted a JIRA issue, but it's basically paused until 
> I can provide a unit test that would pass when the bug is fixed.  I'm not 
> sure how to write that unit test.
>
> The bug is that the SQL syntax produced for Microsoft SQL Server is not 
> locking the proper tables.  The Oracle-variant of the syntax would work on 
> Oracle because its locking syntax is simpler, but MSSQL 
> supports distinct locking on each of the tables involved in a join so the 
> same pattern syntax doesn't lock both tables as it should.
>
> But I'm not sure how to write a unit test to cause NHibernate to produce 
> would-be-executed-SQL so that I can compare it against the expected SQL.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to