Hello Hibernators,
i have a small problem which i can't solve on my own.
I have the following scenario:
i have an ASP.NET application, which runned on hibernate 1.2.0 very nice. Everything worked absolute correctly.
Since the version i used was in RC-status (if i recommend correctly), i decided to upgrade to version 1.2.1, which is stable since i'm interested in deploying on a live webserver.
After struggling with all that namespace changes from from
Code:
urn:nhibernate-configuration-2.0
to
Code:
urn:nhibernate-configuration-2.2
i got the IDE to compile the whole thing.
The session factory and all that stuff is created as usual (in fact, i didn't change the code for building the session factory).
But when it comes to load data from DB via criterias/list, nothing works out: the results are always empty/null.
In preceding versions of hibernate, having an empty resultset was a problem of the setting for the mapping files (this needs to be "Embedded resource" in earlier versions) - but this settings are still correct, i didn't change them.
Here is my hibernate configuration from within web.config file:
Code:
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory name="TestDBAssembly">
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=localhost;initial catalog=TestDB_main;uid=TestDB_user;pwd=test07</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="connection.isolation">ReadCommitted</property>
<property name="default_schema">TestDB_main.dbo</property>
</session-factory>
</hibernate-configuration>
Here is an example of one of my mapping files (all mapping files looking similar in the header section).
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="TestDBAssembly.T_Locales, TestDBAssembly" table="T_Locales">
<id name="ID" type="int" length="4">
<generator class="identity" />
</id>
<property name="Name" type="string" />
<property name="LanguageName" type="string" />
<property name="LanguageFullName" type="string" />
<property name="LanguageMnemonic" type="string" />
<property name="CountryName" type="string" />
</class>
</hibernate-mapping>
i'm working with SQL2005 with SP1, VS.NET2005, ASP.NET 2.0 on Windows XP SP2.
I have looked at the migration guide, but all the issues mentioned there (except the namespace changing) are not relevant for my application, since it consists just of gets/sets.
I tried also to check, if NHibernates execute a query, by looking into SQL Profiler - but it seems that NHibernate doesn't start a query at all.
Has anyone andy idea what the problem could be?
Thanks.