benhyrman wrote:
Carlos,
Can you post your dialect info from your config file?
Also, you changed two things in the mappings, right? Both the type for the ID (qualifying it to the System namespace) and the switch to identity.
benhyrman,
no, actually i had tried both generator="identity" and generator="native". But yes, one important change was the introduction of the System namespace which i think is what solved the problem.
Also, you can see that although the column names in the DB and the field names in the classes are the same, i'm specifiying each one of them in the mapping files. Documentation says it is not necessary, but i decided to follow the pattern from MyGeneration.
The dialect i'm using is MsSql2005Dialect... but the results were the same if i used MsSql2000Dialect.
I didn't change anything in the configuration file. The nhibernate.cfg.xml is the following (just in case anyone is curious):
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Data Source=COMPUTADOR-2\SQLEXPRESS;Initial Catalog=Scopus1;Integrated Security=True</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="connetion.isolation">ReadCommited</property>
<property name="default_schema">Scopus1.dbo</property>
<mapping assembly="DataLayerLibrary1"/>
</session-factory>
</hibernate-configuration>
Thanks again for the feedback,
Carlos