Tuesday 27 February 2007

HQL Query - as, in errors

Tried to do a simple query:
from Page page

returned error ..expected in...

Tried
from Page as page

return error ..unexpected token:as..

After an hour of frustration realised that the object in C# was not called Page (I had renamed this to SalecorePage as it classed with the asp.net class:page).

The use of the wrong name stemmed from performing the query in SQL Server then porting to HQL.