Hi,
as a workaround, I added an additional column (aka CharField) to store the 
hash of that JSON string. Then only the hashes have to be compared. Sure, 
this is not an elegant solution, as it adds redundant data to your database.

If I would write SQL by hand, I could compare the JSON-string using the 
build-in md5() function. But this is not portable, since it would use two 
different hashing implementations, one in Python and one in MySQL.

I did not test to restrict the query using '__contains', but I tested with 
'__exact' which in my opinion is more appropriate - but this did not help. 
So, the hashing field is probably the best workable solution.

Thanks for your answer.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/b7N_UnuxcTcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to