Torque
  1. Torque
  2. TORQUE-176

Avoid additional brackets in sql if many same operators are chained

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-beta1
    • Component/s: None
    • Labels:
      None

      Description

      Currently, if I have
      criterion.and(condition1).and(condition2).and(condition3)
      the sql output will look like
      ((condition1 and condition2) and condition3)

      Instead the sql output should look like
      (condition1 and condition2 and condition3)

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        49d 22h 3m 1 Thomas Fox 30/Jan/12 18:20
        Resolved Resolved Closed Closed
        237d 12h 46m 1 Thomas Fox 24/Sep/12 08:06
        Thomas Fox made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Thomas Fox made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Thomas Fox [ tfischer ]
        Fix Version/s 4.0 [ 12312102 ]
        Resolution Fixed [ 1 ]
        Hide
        Thomas Fox added a comment -

        done, see org.apache.torque.sql.SqlBuilderTest.testAndCriterions()

        Show
        Thomas Fox added a comment - done, see org.apache.torque.sql.SqlBuilderTest.testAndCriterions()
        Thomas Fox created issue -

          People

          • Assignee:
            Thomas Fox
            Reporter:
            Thomas Fox
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development