Skip to content

Regression for filters on entity joins with many-to-one disabled #3046

Closed
@manuelspezzani

Description

@manuelspezzani

I'm trying to migrate my project from v5.2.7 to the latest 5.3.x version but apparently I've hit a potential regression / breaking change on how filters are applied.

My filter is defined like this:

            configuration.AddFilterDefinition(new FilterDefinition(
                LabelFilterName,
                "Label IN ('A', 'B', 'C')",
                new Dictionary<string, IType>(),
                false));

On "simple" queries it is applied as expected, but on a more complex one it is not:

            var query = from b in session.Query<OtherTable>() 
                        join jta in session.Query<JoinTable>() on b.Id equals jta.OtherTableId
                        join ft in session.Query<FilteredTable>() on jta.FilteredTableId equals ft.Id
                        select new
                        {
                            jta.FilteredTableId,
                            ft.Label
                        };

I've attached a small repro to demonstrate the issue: on 5.2.7 both unit tests are green, but on 5.3.11 one of them fails.

repro.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions