You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that query comparing 2 columns in Where clause is not returning matching results, when using InMemoryAdapter, which hurts me in my unit tests.
I've checked it with real db (mysql in my case) and it works correctly, so it looks it's only InMemoryAdapter issue.
I'm using version 0.19.
Below, you can find a unit test, which demonstrates the bug.
[Fact]
public void SimpleData_When2ColumnsAreComparedInWhere_FindsExpectedRow()
{
Database.UseMockAdapter(new InMemoryAdapter());
var db = Database.Open();
db.Translations.Insert(
Text: "some text",
Language: "pl",
OriginalLanguage: "pl"
);
var result = db.Translations
.All()
.Where(db.Translations.Language == db.Translations.OriginalLanguage);
Assert.Equal(1, result.Count());
}
The text was updated successfully, but these errors were encountered:
wmekal
added a commit
to wmekal/Simple.Data
that referenced
this issue
Nov 28, 2015
Hi,
I've noticed that query comparing 2 columns in Where clause is not returning matching results, when using InMemoryAdapter, which hurts me in my unit tests.
I've checked it with real db (mysql in my case) and it works correctly, so it looks it's only InMemoryAdapter issue.
I'm using version 0.19.
Below, you can find a unit test, which demonstrates the bug.
The text was updated successfully, but these errors were encountered: