hi all,
on saving an active record base object to sqlite database, am getting the following exception:
InnerException: NHibernate.HibernateException
Message="The database returned no natively generated identity value"
Source="NHibernate"
although the record is being saved to the database.
The Configuration of Nhibernate is done as follows:
properties.Add("hibernate.connection.driver_class", "NHibernate.Driver.SQLiteDriver");
properties.Add("hibernate.dialect", "activeRecSQLite.CustomSQLiteDialect,activeRecSQLite");
properties.Add("hibernate.connection.provider", "NHibernate.Connection.DriverConnectionProvider");
properties.Add("hibernate.query.substitutions", "true=1;false=0");
properties.Add("hibernate.connection.connection_string", "Data Source=" + dbName + ";Version=3;New=False;Compress=True;");
Note that the CustomSQLiteDialect inherits from NHibernate.Dialect.SQLiteDialect class to override SupportsIdentityColumns function to avoid getting "no such table hibernate_primarykey" exception.(solution from
http://forum.hibernate.org/viewtopic.ph ... 709c37e6d5 issue)
the database is beiing created from SQLitepro2008 and the id of the table is set to be Integer and Primary key.
Any help with this issue is very appreciated.
Thank you