Re: Potential bug with how Value works with Django ORM queries

2023-10-26 Thread Nitin Chaudhary
to > `DatabaseOperations.adapt_json_value()`. > > So this will work: > > `Study.objects.filter(study_data__protocol__general__program_name__in=(Value("Program1", > > output_field=JSONField()), ...))` > > Regards > David > > On Thursday, 26 October 2023 at 03:39:0

Potential bug with how Value works with Django ORM queries

2023-10-25 Thread Nitin Chaudhary
Hi I recently came across a very interesting scenario. I have a JSON Field which I want to query on. I was trying to do some performance optimizations and came across this If I query a non-JSON field like this: Study.objects.all().filter(study_id__in=[Value("Tes1"),Value("Test2")]) and Study.