Skip to content

Nested nullable projection #3350

@yanick4sh

Description

@yanick4sh

Today I tried to upgrade the spring boot version in my application.
I upgrade spring-boot from 3.3.5 to 3.5.4, but I faced regressions (or new wanted behavior ?) with nested projection.

I have a projection with another nested projection :

public interface MyProjection {
    String getReference();
    MyNestedProjection getType();
}

public interface MyNestedProjection {
    String getReference();
}

In my @Entity, type is an optional @ManyToOne.
I use MyProjection with QuerydslPredicateExecutor like that :

jpaCrudRepository.findBy(
    new BooleanBuilder(),
    q -> q.as(MyProjection.class).all()
)

In spring-boot 3.3.5 to 3.4.8 if type is null I still have my projected entity with "type" set to null (left join behavior)
In spring-boot 3.5.0 to 3.5.4 if type is null I don't have my projected entity (inner join behavior)

I didn't read anything about this change in any release note (I may have missed something...)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions