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

Already on GitHub? Sign in to your account

InMemoryAdapterTests.TestFindAllByPartialName fails when table is in schema. #254

Merged
merged 2 commits into from Jan 23, 2013

Conversation

Projects
None yet
2 participants

da9l commented Jan 8, 2013

Hi!

If a table is referenced by a schema name, InMemoryAdapterTests.TestFindAllByPartialName fails.

@da9l da9l commented on the diff Jan 8, 2013

Simple.Data.InMemoryTest/InMemoryTests.cs
@@ -90,10 +90,10 @@ public void TestFindAllByPartialName()
{
Database.UseMockAdapter(new InMemoryAdapter());
var db = Database.Open();
- db.Test.Insert(Id: 1, Name: "Alice");
- db.Test.Insert(Id: 2, Name: "Bob");
- db.Test.Insert(Id: 2, Name: "Clive");
- List<dynamic> records = db.Test.FindAll(db.Test.Name.Like("A%")).ToList();
+ db.MySchema.Test.Insert(Id: 1, Name: "Alice");
@da9l

da9l Jan 8, 2013

If the table test is in a schema, say MySchema.

@da9l da9l commented on the diff Jan 8, 2013

Simple.Data.InMemoryTest/InMemoryTests.cs
@@ -90,10 +90,10 @@ public void TestFindAllByPartialName()
{
Database.UseMockAdapter(new InMemoryAdapter());
var db = Database.Open();
- db.Test.Insert(Id: 1, Name: "Alice");
- db.Test.Insert(Id: 2, Name: "Bob");
- db.Test.Insert(Id: 2, Name: "Clive");
- List<dynamic> records = db.Test.FindAll(db.Test.Name.Like("A%")).ToList();
+ db.MySchema.Test.Insert(Id: 1, Name: "Alice");
+ db.MySchema.Test.Insert(Id: 2, Name: "Bob");
+ db.MySchema.Test.Insert(Id: 2, Name: "Clive");
+ List<dynamic> records = db.MySchema.Test.FindAll(db.MySchema.Test.Name.Like("A%")).ToList();
@da9l

da9l Jan 8, 2013

FindAll with ...Like(...) will not find any records.

da9l commented Jan 15, 2013

I figured out that if I omit the schema name in the field parameter it works.

@markrendle markrendle added a commit that referenced this pull request Jan 23, 2013

@markrendle markrendle Merge pull request #254 from da9l/master
InMemoryAdapterTests.TestFindAllByPartialName fails when table is in schema.
dd0e464

@markrendle markrendle merged commit dd0e464 into markrendle:master Jan 23, 2013

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