Skip to content

Commit

Permalink
Fixed bug for projecting to new typed class (non anonymous class)
Browse files Browse the repository at this point in the history
Signed-off-by: funky81 <funky81.milis@gmail.com>
  • Loading branch information
funky81 committed Aug 14, 2009
1 parent d168199 commit ee55f4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SubSonic.Core/Extensions/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ public static void Load<T>(this IDataReader rdr, T item)
{
string pName = rdr.GetName(i);
currentProp = cachedProps.SingleOrDefault(x => (x.Name.EndsWith("X") ? x.Name.Chop(1) : x.Name).Equals(pName, StringComparison.InvariantCultureIgnoreCase));

if (currentProp == null)
/** maybe this is projection **/
currentProp = cachedProps[i];

//if the property is null, likely it's a Field
if (currentProp == null)
Expand Down

0 comments on commit ee55f4a

Please sign in to comment.