Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2624

SelectQuery "having" qualifier is not considered when calculating cache key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.1, 4.1.B2, 4.2.M1
    • 4.0.2, 4.1.RC1, 4.2.M1
    • None
    • None

    Description

      Here is the failing test demonstrating the problem. query "Having" part must be included in the cache key , just like all the other parts.

      SelectQuery<Artist> q1 = new SelectQuery<>(Artist.class);
      q1.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
      q1.setHavingQualifier(ExpressionFactory.expFalse());
      
      SelectQuery<Artist> q3 = new SelectQuery<>(Artist.class);
      q3.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
      q3.setHavingQualifier(ExpressionFactory.expTrue());
      
      assertNotEquals(
           q1.getMetaData(resolver).getCacheKey(),
           q3.getMetaData(resolver).getCacheKey());
      

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: