Hi Isomorphic,
RESTHandler in current nightly (v11.1p_2017-12-05) has a problem with boolean values. I used ARC to send a request to http://127.0.0.1:8888/builtinds/sc/RESTHandler
I'm using this .ds.xml, but the original one should be good as well to show the problem:
supplyItem.ds.xml change:
Request Body, Both OK (see true/false):
Request Body, Not OK (results in 'N' in INSERT statement):
Request Body, Not OK (results in 'N' in INSERT statement):
In my application the problem is slightly different, which is the reason I noticed the issue in the 1st place:
true is working as expected, everything else is ignored (here everything else is made false (= 'N'))
This is an important one for me, as I need to be able to send false in my user-requests. The problem is not exact as in my application, but one can see that this is definitely not doing whats is intended.
I'd expect the framework to use null as column value for <inStock></inStock> and to complain with a validation error for every value that's not empty or true or false.
Best regards
Blama
RESTHandler in current nightly (v11.1p_2017-12-05) has a problem with boolean values. I used ARC to send a request to http://127.0.0.1:8888/builtinds/sc/RESTHandler
I'm using this .ds.xml, but the original one should be good as well to show the problem:
supplyItem.ds.xml change:
Code:
<field name="inStock" type="boolean" length="1" title="In Stock" escapeHTML="true" sqlStorageStrategy="singleCharYN" />
Code:
<request> <dataSource>supplyItem</dataSource> <operationType>add</operationType> <data> <itemName>Agent pen</itemName> <SKU>007</SKU> <category>Office Paper Products</category> <unitCost>0.07</unitCost> <units>Ea</units> <inStock>true</inStock> </data> </request> <request> <dataSource>supplyItem</dataSource> <operationType>add</operationType> <data> <itemName>Agent pen</itemName> <SKU>007</SKU> <category>Office Paper Products</category> <unitCost>0.07</unitCost> <units>Ea</units> <inStock>false</inStock> </data> </request>
Code:
<request> <dataSource>supplyItem</dataSource> <operationType>add</operationType> <data> <itemName>Agent pen</itemName> <SKU>007</SKU> <category>Office Paper Products</category> <unitCost>0.07</unitCost> <units>Ea</units> <inStock>foobar</inStock> </data> </request>
Code:
<request> <dataSource>supplyItem</dataSource> <operationType>add</operationType> <data> <itemName>Agent pen</itemName> <SKU>007</SKU> <category>Office Paper Products</category> <unitCost>0.07</unitCost> <units>Ea</units> </data> </request>
true is working as expected, everything else is ignored (here everything else is made false (= 'N'))
This is an important one for me, as I need to be able to send false in my user-requests. The problem is not exact as in my application, but one can see that this is definitely not doing whats is intended.
I'd expect the framework to use null as column value for <inStock></inStock> and to complain with a validation error for every value that's not empty or true or false.
Best regards
Blama
Comment