Skip to content

Null Handling of Repository Methods not implemented correctly for "Containing" kind of methods #2373

Open
@vgarmash

Description

@vgarmash

In the documentation we see that it is possible to manage nullability for the repository methods. Look at section 9.4.7 Null Handling of Repository Methods.

image

While it works for simple methods like:
User findByEmailAddress(@Nullable EmailAddress emailAdress);

The same approach will cause an error for "Containing" kind of methods:
User findByFirstnameContaining(@Nullable String name)

If I call this method with null name I get this error: "message": "Argument for creating $regex pattern for property 'section' must not be null!"

I think the more appropriate solution would be omitting any null input parameter during query building phase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions