Skip to content

django like filter wont work for various wildcard chars #80

@jokiefer

Description

@jokiefer

Status Quo

if a fes filter:

<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
 <ogc:And>
  <ogc:PropertyIsEqualTo>
   <ogc:PropertyName>Type</ogc:PropertyName>
   <ogc:Literal>dataset</ogc:Literal>
  </ogc:PropertyIsEqualTo>
  <ogc:PropertyIsLike wildCard="*" singleChar="_" escapeChar="/">
   <ogc:PropertyName>AnyText</ogc:PropertyName>
   <ogc:Literal>*potentielle Evapotranspiration*</ogc:Literal>
  </ogc:PropertyIsLike>
 </ogc:And>
</ogc:Filter>

is converted to a django filter, the like query will result in a exact lookup for *potentielle Evapotranspiration*

This is cause the current like function does not take into account the wildCard char. It will always use the hard coded % char as wildcard.

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