Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-4531

Update DML operation not working for @QuerySqlField with name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.8
    • 1.9
    • sql
    • None

    Description

      After putting a java class Operation with

          @QuerySqlField(name = "operationNumber", index = true)
          private String mOperationNumber;
      
          @QuerySqlField(index = true)
          private String mUuid;
      

      in the cache. Via debug console I can see the following fields:

      _val:

      Operation [... ,mUuid=FF42930B6D3242B5A0B9D631E017027E, mOperationNumber = 0010, ...]

      and a column named: OPERATIONNUMBER with value 0010.

      The query

      String updateQueryString = "UPDATE Operation set operationNumber =  ? WHERE mUuid =  ?";
      SqlFieldsQuery updateQuery = new SqlFieldsQuery(updateQueryString ).setArgs("SCHEDULED","FF42930B6D3242B5A0B9D631E017027E");
      cache.query(updateQuery);
      

      results in:

      Operation [... ,mUuid=FF42930B6D3242B5A0B9D631E017027E, mOperationNumber = 0010, operationNumber=SCHEDULED, ...]

      and a column named: OPERATIONNUMBER with value 0010.

      The column 'OPERATIONNUMBER' and the field 'mOperationNumber' is not updated!

      Attachments

        1. IgniteOperationCacheTest.java
          5 kB
          David Albrecht

        Issue Links

          Activity

            People

              vozerov Vladimir Ozerov
              Sawfish David Albrecht
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m