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

Finder cache is not used if columns have arrayable-operator and comparator

Details

    Description

      If you have a finder with arrayable-operator on one column and a comparator on another like so:

      		<finder name="G_F_NotS" return-type="Collection">
      			<finder-column name="groupId" />
      			<finder-column name="folderId" arrayable-operator="OR" />
      			<finder-column name="status" comparator="!=" />
      		</finder>
      

      after running service builder, the generated code in *PersistenceImpl.java should look like:

      		if ((list != null) && !list.isEmpty()) {
      			for (BookmarksEntry bookmarksEntry : list) {
      				if ((groupId != bookmarksEntry.getGroupId()) ||
      						(status == bookmarksEntry.getStatus())) {
      					list = null;
      
      					break;
      				}
      			}
      		}
      

      instead it looked like:

      		if ((list != null) && !list.isEmpty()) {
      			for (BookmarksEntry bookmarksEntry : list) {
      				if ((groupId != bookmarksEntry.getGroupId()) ||
      						(status != bookmarksEntry.getStatus())) {
      					list = null;
      
      					break;
      				}
      			}
      		}
      

      Attachments

        Issue Links

          Activity

            People

              brian.chan Brian Chan
              shinn.lok Shinn Lok (Inactive)
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                7 years, 36 weeks, 3 days ago

                Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 Alpha 2