LINQ conditional filter not working anymore

Description

This problem apeeread in version 4.0, in previous versions it worked.

for the filter below:

1 2 var filter = 1; Session.Query<MyEntity>().Where(x => x.IdParent = (filter > 0 ? filter : x.IdParent)).ToList()

Expected SQL: select ... from MyEntity myentity0_ where myentity0_.IdParent = 1
Returned SQL: select ... from MyEntity myentity0_ where myentity0_.IdParent = myentity0_.IdParent

Environment

None

Status

Assignee

Frédéric Delaporte

Reporter

Maicon M. Minhoto

Components

Affects versions

4.0.0.GA

Priority

Major
Configure