markrendle/Simple.Data — Issue #143: Result set larger than 100 rows causes error in DataReaderEnumerator
Author: markrendle
Created: 2012-01-31 11:35:15+00:00
State: open

I got a regression from Oracle adapter's point of view. The following test which was working fine before is now broken, I post it here because it is also in the join area:

[Test]
public void self_join()
{
var q = _db.Employees.Query().Join(_db.Employees.As("Manager"), EmployeeId: _db.Employees.ManagerId);
q = q.Select(_db.Employees.LastName, q.Manager.LastName.As("Manager"));
List employees = q.ToList();

Assert.AreEqual(106, employees.Count); // The top man is missing

var kingsSubordinates = employees.Where(e => e.Manager == "King").ToList();

Assert.AreEqual(14, kingsSubordinates.Count);
}

System.NullReferenceException : Object reference not set to an instance of an object.
at Simple.Data.Ado.DataReaderEnumerable.DataReaderEnumerator.SetCurrent()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList(IEnumerable`1 source)
at Simple.Data.SimpleQuery.ToList()
at System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0)
at Simple.Data.Oracle.Tests.ExploratoryTesting.self_join() in ExploratoryTesting.cs: line 82 __// q.ToList()__