What steps will reproduce the problem?
1. Create a query to return multiple result sets, one of which will create an
object with two additional types (see attached test).
2. Run the query, mainly the result set for the three objects
What is the expected output? What do you see instead?
The object with two nested objects should be returned from the Read method.
Instead, an exception is thrown:
Unable to cast object of type
'System.Func`4[SqlMapper.Tests+Post,SqlMapper.Tests+User,SqlMapper.Tests+Comment
,SqlMapper.Tests+Post]' to type
'System.Func`3[SqlMapper.Tests+Post,SqlMapper.Tests+User,SqlMapper.Tests+Post]'.
What version of the product are you using? On what operating system?
v1.4, Windows 7 64bit Ultimate
Please provide any additional information below.
The problem is in the GridReader class, the MultiReadInternal method. When
SqlMapper.MultiMapImpl is called, it is ignoring all but the first two type
parameters, instead using DontMap. Changing this to use the other types makes
it function correctly (see attached file).
Original issue reported on code.google.com by bdow...@gmail.com on 15 Jul 2011 at 2:18
Original issue reported on code.google.com by
bdow...@gmail.com
on 15 Jul 2011 at 2:18Attachments: