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

It's forbidden to perform queries joining by entities that only contain data in the SQL schema of the shard by default

    Details

      Description

      There are several SQL tables that only contains data in the shard by default:
      (see com.liferay.portal.dao.shard.advice.ShardPersistenceAdvice.java):

      • ClassName
      • Company
      • CounterFinder
      • Counter
      • PortalPreferences
      • Release
      • ResourceAction
      • ServiceComponent
      • Shard
      • VirtualHost

      So we shouldn't perform queries joining by these tables since in the rest of the shards is not going to return any results. We currently have have two cases:
      (see /liferay-portal/portal-impl/src/custom-sql/portal.xml)

      • com.liferay.portal.service.persistence.RoleFinder.findByC_N_S_P_A
      • com.liferay.portal.service.persistence.RoleFinder.findByR_N_A

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 44 weeks, 5 days ago