Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-3390

Repo query for two abstract types (or more OIDs in OR-clause) fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5 (Einstein)
    • Component/s: None
    • Labels:
      None

      Description

      The following one:

      <query xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3">
          <filter>
                  <or>
                      <type><type>c:FocusType</type></type>
                      <type><type>c:AbstractRoleType</type></type>
                  </or>
          </filter>
      </query>
      

      fails with:

      unexpected AST node: {vector} [select
        o.fullObject,
        o.stringsCount,
        o.longsCount,
        o.datesCount,
        o.referencesCount,
        o.polysCount,
        o.booleansCount
      from
        com.evolveum.midpoint.repo.sql.data.common.RObject o
      where
        (
          o.objectTypeClass in (:objectTypeClass_0_, :objectTypeClass_1_, :objectTypeClass_2_, :objectTypeClass_3_) or
          o.objectTypeClass in :objectTypeClass2_0_, :objectTypeClass2_1_, :objectTypeClass2_2_
        )]
      

      Sometimes, the OR-query with more OIDs fails as well:

      <query xmlns="http://prism.evolveum.com/xml/ns/public/query-3">
          <filter>
              <or>
                  <substring>
                      <matching>polyStringNorm</matching>
                      <path>name</path>
                      <value>elaine</value>
                  </substring>
                  <substring>
                      <matching>polyStringNorm</matching>
                      <path>name</path>
                      <value>carla</value>
                  </substring>
                  <inOid>
                      <value>elaine</value>
                      <value>carla</value>
                  </inOid>
              </or>
          </filter>
          <paging>
              <orderBy>name</orderBy>
              <offset>0</offset>
              <maxSize>1000</maxSize>
          </paging>
      </query>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mederly Pavol Mederly
                Reporter:
                mederly Pavol Mederly
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: