Skip to content

Join on nullable and not nullable type throws exception #74

@ghost

Description

A join on a nullable type with a not nullable type works in a normal Linqquery:

var realQuery = people.AsQueryable().Join(
                pets,
                person => person.Id,
                pet => pet.NullableOwnerId,
                (person, pet) => new { OwnerName = person.Name, Pet = pet.Name });

But the same with dynamic linq throws an exception:

var dynamicQuery = people.AsQueryable().Join(
                pets,
                "it.Id",
                "NullableOwnerId",
"new(outer.Name as OwnerName, inner.Name as Pet)");

I think it does this because the types do not match?

I forked this repo and wrote a unittest which fails. Check this commit for the complete test.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions