Params datalistFromQuery cache: false

여러 params와 datalistFromQuery를 사용할때 cache를 끄는 방법이 있습니다.

아래와 같이 다른 param키를 참조하여 datalist query를 실행하는 경우에 사용해보세요.

해당 케이스에서 param의 경우 hiddenIfNotOption, disableIfNotOption 2가지 중에 하나를 선택할 수 있습니다.

  - type: query
    resource: mysql.qa
    sqlType: insert
    sql: >
      INSERT INTO products (code1, code2, code3, name)
      values (:code1, :code2, :code3, :name)
    reloadAfterSubmit: true
    class: p-2
    params:
    - key: name
      required: true
      class: w-100 pb-2
    - key: code1
      required: true
      datalistDropdown: true
      dropdownSize: 10
      datalistFromQuery:
        type: query
        resource: mysql.qa
        sql: >
          SELECT DISTINCT level1 AS value
          FROM categories
          ORDER BY level1 ASC
    - key: code2
      datalistDropdown: true
      dropdownSize: 10      
      hiddenIfNotOption: true
      # disableIfNotOption: true
      datalistFromQuery:
        type: query
        resource: mysql.qa
        sql: >
          SELECT DISTINCT level2 AS value
          FROM categories
          WHERE level1 = :code1
          ORDER BY level2 ASC
        cache: false
    - key: code3
      datalistDropdown: true      
      dropdownSize: 10
      hiddenIfNotOption: true
      # disableIfNotOption: true
      datalistFromQuery:
        type: query
        resource: mysql.qa
        sql: >
          SELECT DISTINCT level3 AS value
          FROM categories
          WHERE level1 = :code1
            AND level2 = :code2  
          ORDER BY level3 ASC
        cache: false