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

SQL schema is overwritten by static query entity configuration

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.4, 2.7
    • Fix Version/s: 2.8
    • Component/s: sql
    • Labels:
      None

      Description

      Steps to reproduce:
      1. Start and restart a node with persistence enabled and the following cache configuration:

      <property name="cacheConfiguration">
          <bean class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="cache"/>
              <property name="queryEntities">
                  <list>
                      <bean class="org.apache.ignite.cache.QueryEntity">
                          <property name="keyType" value="java.lang.Long"/>
                          <property name="valueType" value="Person"/>
      
                          <property name="fields">
                              <map>
                                  <entry key="id" value="java.lang.Long"/>
                                  <entry key="firstName" value="java.lang.String"/>
                              </map>
                          </property>
                      </bean>
                  </list>
              </property>
          </bean>
      </property>
      

      2. Execute the following DDL statement:

      ALTER TABLE "cache".Person ADD COLUMN lastName varchar;
      

      3. Restart the node.

      After the restart Person table contains only two columns

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dmekhanikov Denis Mekhanikov
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: