How to use formula property in NHibernate mapping

My question is how to use the formula property that should be used in the SQL where clause. In particular, I would like to use (datepart (hh, getdate ())) as the formula and the resulting SQL, which I expect

Select select_list from table_name where (datepart (hh, getdate ())) <17

But I saved the where clause as follows:

where (this_0_.hh, getdate ())) <= 17

I'm not sure why an alias is inserted before the "hh" date part.

Any help on how to get this when an offer of law is much appreciated!

Thank.

+3
source share
1 answer

, , hh ( MS , , 'hh' )

( gethour), datepart(hh, getdate()).

+1

Source: https://habr.com/ru/post/1795640/


All Articles