Contains lookup doesn't seem to support LIKE 'value%' SQL

17 views
Skip to first unread message

nemesis

unread,
Oct 15, 2014, 5:27:46 AM10/15/14
to django...@googlegroups.com
issue here:
https://github.com/djangonauts/django-hstore/issues/75

It seems that it is not possible to use the "contains" lookup to perform partial searches in values.

Is it true? I haven't yet tried this.

If yes, does anybody have an idea of how to add this? Just enhance the "contains" lookup or change the API to have a new lookup?

Federico
Message has been deleted

David Muller

unread,
Oct 15, 2014, 11:19:51 AM10/15/14
to django...@googlegroups.com

A little more succinctly what I'd like to do is: do a filter operation on the value of a specific key.

The following query is incorrect syntactically, but conveys the type of query I'd like to make:SomeHstoreModel.objects.filter(hstore_attribute['specific_key']__contains="string I am looking for")

Reply all
Reply to author
Forward
0 new messages