Description
,{"AS":"models","ON":["=",[".models.Id"],[".machines.ModelId"]],"JOIN":"LEFT OUTER"}]}
is translated to
SELECT fl_result(fl_value(machines.body, 'Id')), fl_result(fl_value(machines.body, 'Label')) AS Label2, fl_result(fl_value(machines.body, 'ModelId')), fl_result(Label2) AS ModelLabel FROM kv_default AS machines LEFT OUTER JOIN kv_default AS models ON (fl_value(models.body, 'Id') = fl_value(machines.body, 'ModelId')) WHERE fl_value(machines.body, 'Type') = 'machine' AND (fl_value(machines.body, 'Disabled') = fl_bool(0) OR fl_value(machines.body, 'Disabled'))
and it ought to be
SELECT fl_result(fl_value(machines.body, 'Id')), fl_result(fl_value(machines.body, 'Label')) AS Label2, fl_result(fl_value(machines.body, 'ModelId')), fl_result(models.body, 'Label2') AS ModelLabel FROM kv_default AS machines LEFT OUTER JOIN kv_default AS models ON (fl_value(models.body, 'Id') = fl_value(machines.body, 'ModelId')) WHERE fl_value(machines.body, 'Type') = 'machine' AND (fl_value(machines.body, 'Disabled') = fl_bool(0) OR fl_value(machines.body, 'Disabled'))
Attachments
Issue Links
- is cloned by
-
CBL-3043 QueryParser wrong for a case of JOIN
- Closed