I recently started using FluenNHibernate, and there was some strange problem when I tried to write unit test with SQLite.
I use SQLite in the database database for testing, for each testing method I clear the data existing in the database. In the example:
var u = new User() { Name = "Piotr" };
_session.Save(u);
_session.Clear();
var list = _session.CreateCriteria<User>().List();
This code works fine, but when I write in the following line:
var list2 = _session.CreateQuery("FROM User").List();
I get:
System.Data.SQLite.SQLiteException: SQLite error
no such table: users
NHibernate's SQL query is beautiful, so what could be the problem?
miensol
source
share