Linq where "is base class" doesn't get subclasses

Description

Let's say I have the following structure, mapped with a discriminator (Table per hierarchy):

1 2 3 4 5 Entity (abstract, no discriminator) | Animal (abstract, no discriminator) / \ Dog (1) Cat(2)

If I query on this using Linq:

1 .Where(x => x.Entity is Animal)

I get no results. When looking at the generated query I expected to see:

1 where type in (1, 2)

But instead I got this:

1 where type='animal'

Animal is abstract and doesn't even have a discriminator, so the generated query is meaningless.

Environment

None

Status

Assignee

Unassigned

Reporter

alexandre

Labels

Components

Fix versions

Affects versions

4.1.1

Priority

Major
Configure