Skip to content

Allow OrmLiteConfig.StringFilter to fire on null strings #306

@robertmiles3

Description

@robertmiles3

In case one wanted to have OrmLiteConfig.StringFilter deal with a null string coming back from the DB (like setting it to string.Empty instead), it would be nice to allow the StringFilter to be called on the null string. However, currently it doesn't because the as conversion returns null and therefore skips it. A downside is that I could see this being a breaking change for users who are currently not handling null possibilities within their StringFilter implementations.

Seems like a design-related question whether it should be allowed, so thought I'd ask. If it stays as-is, can you think of another option to have a StringFilter-esque operation on null strings?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions