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());
}
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.