Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.0 DXP FP45, 7.0.X, Master
-
7.2.x, 7.0.x
-
Committed
-
12
-
2
Description
In service.xml file String columns can be set to keep null value with specifying the convert-null="false" attribute.
This works unless the CacheModel is used, as explicit conversion to empty string (aka "") always happens for it in case of null value.
Steps to reproduce (DXP/7.0.x)
- Deploy the attached bundles: convert.null.test.api-1.0.0.jar, convert.null.test.service-1.0.0.jar, convert.null.test.mvc.portlet-1.0.0.jar
- Add ConvertNullTest-mvc portlet to a page and see what is logged:
2018-04-20 13:35:31.223 INFO [http-apr-8080-exec-10][ConvertNullTest:209] adding Foo... 2018-04-20 13:35:31.234 INFO [http-apr-8080-exec-10][ConvertNullTest:217] getting Foo... 2018-04-20 13:35:31.234 INFO [http-apr-8080-exec-10][ConvertNullTest:219] From DB: null 2018-04-20 13:35:31.235 INFO [http-apr-8080-exec-10][ConvertNullTest:226] getting Foo (this time from cache)... 2018-04-20 13:35:31.235 INFO [http-apr-8080-exec-10][ConvertNullTest:228] From Cache: "
The test bundles don't deploy on master.
As the issue is Service Builder related, there is no straightforward way to test the committed solution.