Is there anyway to hook into the executing of the SQL so that I can
alter the SQL before it is executed?
Or anyway to stop NHibernate from being "smart".
The SQL NHibernate tries to execute as a result of the configuration
(with the formula) is this:
SELECT this_.PriceId as PriceId0_0_,
this_.Multiplier as Multiplier0_0_,
this_.EffectiveDate as Effectiv3_0_0_,
(ROW_NUMBER() this_.OVER (this_.PARTITION BY this_.AgreementId ORDER
BY this_.EffectiveDate DESC)) as formula0_0_
FROM Price this_
I just need to change this to:
SELECT this_.PriceId as PriceId0_0_,
this_.Multiplier as Multiplier0_0_,
this_.EffectiveDate as Effectiv3_0_0_,
(ROW_NUMBER() OVER (PARTITION BY this_.AgreementId ORDER BY
this_.EffectiveDate DESC)) as formula0_0_
FROM Price this_
Please anyone?