Syntax error, unexpected token AND, near to ' (country_id=250 or country_id = -1) and (carrier_id=348 or carrier_id = -1) and (device_id=3 or device_id = -1) and (os_id=4 or os_id = -1) and type='exclusive' LIMIT ?1', when parsing: SELECT [PxRoute].* FROM [PxRoute] WHERE adPackage_id= and (country_id=250 or country_id = -1) and (carrier_id=348 or carrier_id = -1) and (device_id=3 or device_id = -1) and (os_id=4 or os_id = -1) and type='exclusive' LIMIT ?1 (527)