Skip to content

SQLite not supported on CoreFX #1638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jpenniman opened this issue Apr 4, 2018 · 8 comments
Closed

SQLite not supported on CoreFX #1638

jpenniman opened this issue Apr 4, 2018 · 8 comments

Comments

@jpenniman
Copy link

The SQLite driver currently looks for System.Data.Sqlite to load the ADO.Net provider. However, the current SQLite driver for CoreFX is provided by Microsoft as Microsoft.Data.Sqlite.

@fredericDelaporte
Copy link
Member

These are two distinct providers. SQLite20Driver will go on using System.Data.SQLite, and so will wait for this provider to be Core compatible before being usable wit .Net Core. (It seems they are thinking about it, here.)

Integrating Microsoft.Data.Sqlite should be done as a distinct driver, preferably even as a distinct NuGet package in a distinct GitHub repository, as I have written in #1635:

The way built-in dialects and drivers are included directly in NHibernate core is somewhat a legacy, from times where NuGet was not a de facto standard way of distributing software. And it has drawbacks, like drivers relying on reflection for avoiding taking a hard dependency on data providers of every database system. It also has the trouble of either being untested by the CI, or complicating further the CI by adding another database to test.

So instead of contributing the dialect/driver directly into NHibernate core, you may consider contributing them as a separated project within its own GitHub repository, yielding a dedicated NuGet package which could then take direct dependencies on the data provider. There is some work ongoing for splitting drivers (not yet dialects) out of NHibernate: #626. You can have a look at this PR to see in which direction the dialect/driver area is currently heading.

@jpenniman
Copy link
Author

I created a driver MilestoneTG.NHibernate.Driver.Sqlite.Microsoft, but it looks like the Microsoft Driver isn't fully implemented. For example, GetSchema() fails with a NotSupportedException when using the schema exporter.

It's too bad. We use SQLite for all our unit testing.

@fredericDelaporte
Copy link
Member

Yes I have read that this driver was incomplete, further enforcing my opinion we should not "tweak" SQLite20Driver for using it under .Net Core/Standard.

@hazzik
Copy link
Member

hazzik commented Apr 4, 2018

Also the Microsoft's driver does not support nested transactions (we use them to query IDs), and I guess many more issues not yet discovered.

@MonkAlex
Copy link

Today system.data.sqlite bug be closed. I need only system.data.sqlite (when released) or nhibernate update too?

@fredericDelaporte
Copy link
Member

Provided they have not changed the assembly and classes naming, there will be no need of a change in NHibernate.

@xp-development
Copy link

Is there a way to find out all issues of the Microsoft driver?

@fredericDelaporte
Copy link
Member

Well, write your own NHibernate driver using it, and try running the NHibernate tests suit with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants