Hi Isomorphic,
please see this v10.1p_2016-04-08 BuiltInDS-based testcase, where the generated SQL-WHERE is not as expected ("true" value is not generated as expected).
BuiltInDS.java: See this thread.
animals.ds.xml addition:
The generated SELECT is:
Besides the same bug as in the linked thread above, I'd expect the comparison to be "'Y' = 'Y'".
Best regards
Blama
please see this v10.1p_2016-04-08 BuiltInDS-based testcase, where the generated SQL-WHERE is not as expected ("true" value is not generated as expected).
BuiltInDS.java: See this thread.
animals.ds.xml addition:
Code:
<field name="myFalse" title="Dummy field (false)" type="boolean" sqlStorageStrategy="singleCharYN" customSelectExpression="'N'"/> <field name="myTrue" title="Dummy field (true)" type="boolean" sqlStorageStrategy="singleCharYN" customSelectExpression="'Y'"/> .. .. <operationBindings> <operationBinding operationType="fetch"> <criteria _constructor="AdvancedCriteria" operator="or"> <criterion fieldName="myFalse" operator="equals" value="false" /> <criterion fieldName="myTrue" operator="equals" value="true" /> </criteria> </operationBinding> </operationBindings> [B][/B]
The generated SELECT is:
Code:
SELECT COUNT( *) FROM animals WHERE(('N' = 'N' AND 'N' IS NOT NULL) AND(LOWER(animals.commonName) LIKE LOWER('a%') ESCAPE '\' AND animals.commonName IS NOT NULL) [B]AND('Y' = 'N'[/B] AND 'Y' IS NOT NULL))
Best regards
Blama
Comment