grahamrhay
grahamrhay

Reputation: 2166

Is there any way to get NHibernate to emit a deadlock hint?

Is there any way to get NHibernate to emit a deadlock hint? e.g. for SQL server "SET DEADLOCK_PRIORITY LOW". At the moment I'm just executing a raw SQL query.

Upvotes: 5

Views: 579

Answers (3)

Saif
Saif

Reputation: 91

Here is the technique set dead lock priority, this uses nhibernate interceptors in order emit deadlock priority

Disclosure: Please note that link provided is of my own website

Upvotes: 2

Alkampfer
Alkampfer

Reputation: 1337

I used a technique based on interceptor and comments to add query hint to an HQL or ICriteria query, you can find details here. This is not the real solution for you but you can start from here and change the interceptor to allow deadlock hint.

Upvotes: 1

Rashack
Rashack

Reputation: 4665

I am pretty sure there is no such thing. And emiting raw SQL seems OK to me in this very specific case.

Upvotes: 1

Related Questions