Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce class ipl\Orm\Behavior\NonTextMatch #71

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Aug 4, 2022

  1. Introduce class ipl\Orm\Behavior\NonTextMatch

    It's purpose is to automatically cast non-text values
    to text if the used filter is a `LIKE`.
    
    Though, I don't *like* this. But it's the only solution
    right now. It depends highly on the maintained column
    type. While this isn't that bad, since *I* believe there
    are more text columns than other types (so maintaining them
    isn't that difficult), but currentlyl there's no default
    type. So if the type is not maintained, it currently casts
    everything to text, even if not necessary. But is it a good
    idea to have the type default to text?
    
    This needs to be addressed.
    
    Also, is there an alternative implementation? Another bad
    thing is that each model has to provide it explicitly. This
    should be a default behavior somehow if you ask me. If you
    have several models seeing this everywhere makes you wonder:
    
    ```
    $behaviors->add(new NonTextMatch());
    ```
    nilmerg committed Aug 4, 2022
    Configuration menu
    Copy the full SHA
    a1adee4 View commit details
    Browse the repository at this point in the history