mendix / RestServices

REST service module for Mendix. Supports consuming and publishing REST based services and real-time data synchronization. Supports JSON, form-encoded, multipart and binary data transport.
Apache License 2.0
31 stars 46 forks source link

The absence of primitive numbers and booleans cannot detected for input objects in published microflows #26

Closed mweststrate closed 10 years ago

mweststrate commented 10 years ago

Both

{ test : true }

and

{}

will result in the same input object for a microflow, if the default value of that attribute in Mendix is true. However, the intended behavior might be very different.

dlhartveld commented 10 years ago

@mweststrate Does the above commit fix this problem for primitive numbers as well?

ismailhabib commented 10 years ago

I believe we don't have that yet. For numbers we can use a workaround by defining a value which represents null, for example: -1. Not the prettiest though.

dlhartveld commented 10 years ago

Boolean values were easily 'fixed' by creating an enumeration with true/false, which can then be set to empty. Fixing this by enumerating all integers might not be the most ... intelligent solution. Using the default value (i.e. -1) from the domain model is a valid workaround for now, I think.