Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-14277

SQL Query Store with JOIN should allow fields repeated for select and delete

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 14.0.2.Final
    • Persistence
    • None

    Description

      Using the following Protobuff schemas:

      package com.example;
      
      enum Sex {
         FEMALE = 1;
         MALE = 2;
      }
      
      message Person {
         optional string name = 1;
         optional Address address = 2;
         optional bytes picture = 3;
         optional Sex sex = 4;
         optional fixed64 birthDate = 5 [default = 0];
         optional bool accepted_tos = 6 [default = false];
      }
      
      message Address {
         optional string street = 1;
         optional string city = 2 [default = "San Jose"];
         optional int32 zip = 3 [default = 0];
      }
      

      And the following query:

      <queries select-single="SELECT t1.name, t1.picture, t1.sex, t1.birthdate, t1.accepted_tos, t2.street, t2.city, t2.zip FROM Person t1 JOIN Address t2 ON t1.name = t2.name WHERE t1.name = :name"
      delete-single="DELETE FROM Person t1 WHERE t1.name = :name; DELETE FROM Address t2 where t2.name = :name"
      ....
      />
      

      Will throw the following error:

      Caused by: org.infinispan.commons.CacheConfigurationException: ISPN008053: Delete and select queries do not have matching arguments. Delete was [name, name] and select was [name]
      

      Attachments

        Issue Links

          Activity

            People

              wburns@redhat.com Will Burns
              gustavolira Gustavo Lira Silva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: