Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-81704

FinderCache doesn't work properly when using null values in a null convertible string column (for all cases)

Details

    Description

      After LPS-81028 there are still some methods where finderCache isn't working properly in the persistence layer.

      Steps to Reproduce:

      1. Execute the following Groovy script:
      import com.liferay.counter.kernel.service.CounterLocalServiceUtil;
      import com.liferay.portal.kernel.model.ListType;
      import com.liferay.portal.kernel.service.ListTypeLocalServiceUtil;
      
      ListType listType = ListTypeLocalServiceUtil.createListType(CounterLocalServiceUtil.increment());
      
      listType.setName("Test");
      listType.setType(null);
      
      out.println("Result before update expected 0 is : " + ListTypeLocalServiceUtil.getListTypes(null).size());
      
      listType = ListTypeLocalServiceUtil.updateListType(listType);
      
      out.println("Result after update expected 1 is : " + ListTypeLocalServiceUtil.getListTypes(null).size());
      
      ListTypeLocalServiceUtil.deleteListType(listType);
      

      Expected Results:

      Before the insertion no record should be found, but after inserting one must be returned.

       

      Actual Results:

      Before the insertion no record is found, but after inserting none (the cached value) is returned.

      Attachments

        Issue Links

          Activity

            People

              brian.chan Brian Chan
              mariano.alvaro Mariano Álvaro
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5 years, 1 week, 1 day ago

                Packages

                  Version Package
                  7.0.0 DXP FP62
                  7.0.X
                  7.1.10 DXP FP4
                  7.1.10.1 SP1
                  7.1.2 CE GA3
                  7.1.X
                  7.2.X
                  Master