I am getting a cannot load entity error because of {"Incorrect syntax near the keyword 'File'."}
Here is my mapping file. I'm assuming I am not escaping something properly but I don't see what. I don't think it's my PreApplication.File table name. Thanks in advance!!
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Model" namespace="Model.PreApplication">
<class name="File" table="PreApplication.File">
<id name="ID" column="ID" type="Int32" unsaved-value="0">
<generator class="native" />
</id>
<property name="DateUploaded" column="DateUploaded" type="DateTime" not-null="true" />
<property name="FileName" column="`FileName`" type="String" not-null="true" />
<property name="OriginalFileName" column="OriginalFileName" type="String" not-null="true" />
<property name="ContentType" column="ContentType" type="String" not-null="true" />
</class>
</hibernate-mapping>
Edit: Using the suggestions provided, I've discovered that they problem is being caused by my table being called File. If I change the table attribute to "PreApplication.[File]" it works correctly, but I don't think that's the "NHibernate" way of doing it. I think I'm supposed to use the tick character (`) but I can't seem to make that work.