While it sould be easy to write such validator using the like operator, it would not be portable because it would not work on gae and would be slow in general. The preferred way is to use a hidden autocomputed normalized field.
On Jun 25, 10:54 am, NickFranceschina <[email protected]> wrote: > Massimo, > > just realized that GQL does not allow for LOWER() or UPPER()... thus > cannot do case-insensitive searches. the generally suggested solution > is to create another field and store the canonical form of the string > you're trying to search > > example: > person.name = "Nick Franceschina" > person.canonical = "nick franceschina" > > would be nice to have a validator that could do this automatically... > it would work like the IS_LOWER() validator, but would look into > another field for the data... something like: > Field('canonical', 'string', requires=CANONICAL('person.name')) > > then I just put my data into "name" as I always do, and wouldn't have > to write special code to do the canonical field... > > is there anything like this now, and I'm not seeing it? i'll keep > looking... > > Thanks, > -Nick Franceschina

