Uploaded image for project: 'Doma'
  1. Doma
  2. DOMA-7

ifコメントが連続でネストし、かつ、それらの条件が成立しない場合にwhereが出力されてしまう問題に対応しました。

XMLWordPrintable

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major Major
    • 0.9.4
    • Affects Version/s: 0.9.3
    • Component/s: None
    • None

      このSQLを実行するとする。

       
      select * from employee where 
        /*%if name != null*/
          /*%if id != null*/
             id = /*id*/99
          /*%end*/
        /*%end*/
      

      ifコメントの条件が成立しない場合に次のように変形される。

       
      select * from employee where 
      

      本来は次のようにならければいけない。

       
      select * from employee
      

            Assignee:
            taedium taedium
            Reporter:
            taedium taedium
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: