Closed PriyankaChandrabose closed 11 months ago
Any update on this issue. The schema is not getting updated and throws the above exception
how to connect nhibernate with Microsoft.Data.Sqlite without using extensions and make schema update work
Thanks. I don't really know what is Hibernate.Extensions.Sqlite.SqliteDialect
. I'll take a look at the issue later in the week.
To use nhibernate with Microsoft.data.sqlite to support creation and updation of tables - what driver and dialect to be used ? any examples available ?
Hi,
Found the exact point of the error
GetTables method of nhibernate is passing second argument and sqlconnection.cs class of Microsoft.Data.Sqlite is throing exception is 2nd argument is passed. Can some one help me with this
So, it looks like Microsoft.Data.Sqlite simply does not support a feature required by NHibernate for schema-update. The easier way to solve this is to ask for the feature on Microsoft side, if you find where to ask. But it seems they do not intend implementing it due to how they document this lack of support.
DbConnection.GetSchema()
isn't implemented. This API isn't well-defined, so we recommend retrieving database metadata directly using standard SQLite APIs like the sqlite_master table and the table_info PRAGMA.For more information, see Metadata.
On that later link:
Microsoft.Data.Sqlite doesn't implement the GetSchema method on DbConnection. Instead, you can query directly for schema information using the sqlite_master table and PRAGMA statements like table_info and foreign_key_list.
So, your other option is to implement your own SQLiteDataBaseMetaData
following the recommendations of the above documentation.
When schema update is being called, the following exception came with or with out actual schema update