I am trying to get a list of all movies from my PostgreSQL db like this:
IQuery query = session.CreateQuery("FROM Movie");
but get this error: ERROR: 42P01: relation "movies" does not exist
Here is a query that I use in pgAdminIII that works
SELECT
"Movies"."Id",
"Movies"."Title",
"Movies"."Director",
"Movies"."ReleaseDate"
FROM
public."Movies";
It looks like the query is not correct that is being built from nHibernate. Here is the web.config setup.
<configSections>
<section name="hibernate-configuration" requirePermission="false" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
</configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory name="NHibernate.Test">
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.NpgsqlDriver</property>
<property name="connection.connection_string">Server=localhost;database=Movies;User ID=movie;Password=password;</property>
<property name="dialect">NHibernate.Dialect.PostgreSQLDialect</property>
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
</session-factory>
</hibernate-configuration>
Any ideas?