for now, we do this:
https://gist.github.com/dbu/9524776#file-caseinsensitivestringfilter-php-L40
i see 2 things we could do:
doctrine_orm_filter_types.xml add an option to configure the default
behaviour
sonata.admin.orm.filter.type.string
additionally, we could add an option to the filter to set it per case
(who knows, maybe i have one field where i really want case sensitive
filtering).
btw, one can achieve the opposite, make mysql case sensitive for likes
with "column COLLATE utf8_bin LIKE :value" (resp = or NOT LIKE)
not sure how this is best modeled. if we don't care about BC, i would
say postgres should by default start to compare case insensitive. but
this would be very surprising for existing applications that rely on the
behaviour.
having 2 more ChoiceType options sounds like a bad idea too, it will
overkill for the admin user most of the time.
so what about adding the default and per-filter option to overwrite the
behaviour to explicitly case sensitive or explicitly case insensitive?
we would then need to look into the doctrine driver to determine what we
need to do about it. (and what about other db than postgres + mysql? i
don't know them so i would throw an exception that this is not supported
if an explicit option is set)
cheers,david
Am 10.03.2014 12:11, schrieb Thomas Rabaix:
> - write a custom doctrine_orm_string_case___insensitive filter
> that takes care of this logic and inject it in the container.
>
> Does anyone have another, easier solution, or any experiences
> with any of the above? Thanks for sharing!
>
>
> best regards
>
> Stefan Paschke
>
> --
> You received this message because you are subscribed to the Google
> Groups "sonata-users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
sonata-users...@googlegroups.com
> <mailto:
sonata-users...@googlegroups.com>.
> <mailto:
sonata...@googlegroups.com>.
> --
> You received this message because you are subscribed to the Google
> Groups "sonata-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
sonata-users...@googlegroups.com
> <mailto:
sonata-users...@googlegroups.com>.
> <mailto:
sonata...@googlegroups.com>.