Skip to content

Commit

Permalink
FIX FOR THE VALUE TYPE TESTS FAILURE WE WERE IGNORING!
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydmiller committed Jan 24, 2025
1 parent fe4960c commit 86f7b2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Marten/Linq/Members/StringValueTypeMember.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class StringValueTypeMember<T>: StringMember, IValueTypeMember<T, string>

public StringValueTypeMember(IQueryableMember parent, Casing casing, MemberInfo member, ValueTypeInfo valueTypeInfo) : base(parent, casing, member)
{
MemberType = member.GetRawMemberType();
_valueSource = valueTypeInfo.ValueAccessor<T, string>();
var converter = valueTypeInfo.CreateConverter<T, string>();

Expand Down
7 changes: 7 additions & 0 deletions src/Marten/Linq/Parsing/LinqQueryParser.Handlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ public static IQueryHandler<TResult> BuildHandler<TDocument, TResult>(ISelector<
return (IQueryHandler<TResult>)new ListQueryHandler<TDocument>(statement, selector);
}

var documentType = typeof(TDocument);

// if (typeof(TResult).CanBeCastTo<IEnumerable<Nullable<TDocument>>>())
// {
// return (IQueryHandler<TResult>)new ListQueryHandler<Nullable<TDocument>>(statement, selector);
// }

throw new NotSupportedException("Marten does not know how to use result type " +
typeof(TResult).FullNameInCode());
}
Expand Down

0 comments on commit 86f7b2e

Please sign in to comment.