Nhibernate QuerySyntaxException is not mapped from

An important step which is often overlooked when beginning the process of mapping your database is to set the Build Action to Embedded Resource. (Buildvorgang – Eingebettete Resource). If you forget to do this you may receive a QuerySynataxException stating that the … is not mapped [from …].


It is also possible to store the mapping files (class.bhm.xml) in the working directory of the program which uses them. However, I personally find it easier to deploy when the mapping files are embedded.