I have one service that connects to a MySQL database, and I want to fetch records using a filter with two fields. Basically, I’m doing the request like this:
http://dsp_url/api/v2/service/_table/tablename?filter=[field1='value1' AND field2='value2']
(I’m using test_rest.html utility, that’s why I’m using brackets here)
This request returns exatly one record, which is what I want. The problem is when I execute the same request to my second DF instance: it returns no record at all!
Lets say the instance A is where this request works, and intance B where it returns no records.
In the instance B, when I use no filter I get all the records. When I specify only one field in the filter the result is ok (the filter is appropriately applied). But when I add the second parameter I get no records in the response. If I use swagger using the very same credentials, the result is the same.
I took some desperate measures : the instance B connecting to the same database as instance A - the result is the same. I installed a brand new instance of DF on AWS and configured everything again, and the result is the same. I checked the logs and no error is reported (neither in DF logs or Nginx logs).
If I connect to the database served by instance B using mysql command line utility, I’m able to select the desired record using the appropriate SQL statement (
SELECT * FROM tablename WHERE field1 = 'value1' AND field2 = 'value2')
Both DF instances are on 2.0.4.
Honestly I don’t know what else to check for error. Any ideas will be much appreciated.
Thanks in advance!