I have the following named SQL query defined:
<sql-query name="ItemSearch">
<return class="ItemSearchResult">
<return-property name="Item" column="ItemId" />
<return-property name="Distance" column="Distance" />
</return>
SELECT
Items.*,
dbo.DistanceBetween(Latitude, Longitude, :lat, :long) AS Distance
FROM Items
WHERE Contains(Name, :keywords)
ORDER BY Distance ASC
</sql-query>
Whenever I try to run my application, I get the generic error "Errors in named queries: {ItemSearch}". Is there something obviously wrong here?
The ItemSearchResult class is a very simple wrapper class that looks like this:
public class ItemSearchResult
{
public Item Item {get; set;}
public double Distance {get; set;}
}