Compare term to current date in HQL (with .Net)
Posted
by Jan-Frederik Carl
on Stack Overflow
See other posts from Stack Overflow
or by Jan-Frederik Carl
Published on 2010-06-15T08:59:58Z
Indexed on
2010/06/15
9:02 UTC
Read the original article
Hit count: 306
Hello, I want to compare a column value to the current date, using HQL.
I tried
IQuery someQuery = session.CreateQuery(String.Format(
@"Select s.Id
From InventoryProductStateItem s
where s.ValidFrom < current_date()"));
This throws the exception "Incorrect syntax near keyword current_date()"
Can someone help me?
© Stack Overflow or respective owner