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

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

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 14.0.2.Final
    • Persistence
    • None

      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]
      

              wburns@redhat.com Will Burns
              gustavolira Gustavo Lira Silva
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: