Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 584255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:52:43+00:00 2026-05-13T14:52:43+00:00

I am getting a cannot load entity error because of {Incorrect syntax near the

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:52:43+00:00Added an answer on May 13, 2026 at 2:52 pm

    I’ve found the correct way of fixing this. I found the schema attribute and have changed it as follows:

    <class name="File" schema="PreApplication" table="`File`">
    

    This properly escapes the File table name without having to hardcode []. Thanks for the help everyone!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the common Chrome error XMLHttpRequest cannot load file: Cross origin requests are
I'm getting ! Taps Load Error: cannot load such file -- sqlite3 even though
cannot load c:/PHP5/php5apache2_2.dll into server I am getting this error while running apache 2.2
I am getting this error in chrome XMLHttpRequest cannot load ttp://www.officeyoganyc.com/lists/?p=subscribe. Cross origin requests
I am getting a Cannot Load fpacutl10.dll error every time I click on the
On first load of my Silverlight application I keep getting this error: Could not
I'm getting the error: XMLHttpRequest cannot load http://www.scirra.com/handlers/arcadeProcessScore.ashx. Origin http://static1.scirra.net is not allowed by
i am getting The object cannot be deleted because it was not found in
I am getting cannot load such file -- bootstrap/sass I have installed bootstrap-sass-2.0.3.1, sass-3.1.18,
I'm getting this JavaScript error XMLHttpRequest cannot load http://foo.bar.no/API/map_tools/clean_addresses/check . Origin http://foo.bar.no:9294 is not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.