Hi Tharindu,

How about storing space character instead of empty string. i have not tried
it in Oracle db but if that works IMO there will not be an effect on user
experience.

Thanks & Regards,
Ishara Cooray
Senior Software Engineer
Mobile : +9477 262 9512
WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

On Fri, Jan 6, 2017 at 5:19 PM, Uvindra Dias Jayasinha <uvin...@wso2.com>
wrote:

> Setting a default value for empty fields being sent seems to be best.
>
> Furthermore we can have default values set in our DTO objects in case a
> given field is omitted altogether.
>
> So handling both the above scenarios can overcome the limitation in Oracle.
>
> But I dont know if this is good for the REST API user experience, when
> retrieving data that contains these default values.
>
> On 6 January 2017 at 15:28, Tharindu Dharmarathna <tharin...@wso2.com>
> wrote:
>
>>
>>
>> On Fri, Jan 6, 2017 at 3:26 PM, Tharindu Dharmarathna <tharin...@wso2.com
>> > wrote:
>>
>>> Hi All,
>>>
>>> I faced $Subject in Oracle database while running integration test on C5
>>> on top.
>>>
>>> *Observation*
>>>
>>> when insert empty string ("") it was save as null in database.
>>>
>>> While going through SO I had found [1] , which did happen in oracle
>>> database.
>>>
>>>
>>> We have come up with several ways to handle empty strings which user
>>> sends through the rest api.
>>>
>>> 1.  Validate the request and send error when giving empty strings
>>> 2.  Set default value like "N/A" into the fields which send as empty.
>>>
>>> Is there any other way to handle this problem ?.
>>>
>>> [1] - http://stackoverflow.com/questions/13278773/null-vs-empty-
>>> string-in-oracle
>>>
>>> Thanks
>>>
>>>
>>> *Tharindu Dharmarathna*Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94779109091 <+94%2077%20910%209091>*
>>>
>>
>>
>>
>> --
>>
>> *Tharindu Dharmarathna*Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94779109091 <+94%2077%20910%209091>*
>>
>
>
>
> --
> Regards,
> Uvindra
>
> Mobile: 777733962
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to