Torque
  1. Torque
  2. TORQUE-243

Criterion gets modified by Criteria

    Details

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

      Description

      In the situation
      Criterion criterion = new Criterion(SomePeer.COLUMN, value);
      Criteria criteria = new Criteria().where(criterion);
      criteria.and(SomePeer, someOtherColumn);

      the criteria.and() in the last line also unexpectedly changes the original criterion.
      Expected behaviour: The Criterion should not be changed by changing the criteria object.

        Activity

        Thomas Fox created issue -
        Thomas Fox made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Thomas Fox added a comment -

        To have consistent behavior, the same should be valid for Criterion.and and Criterion.or

        Show
        Thomas Fox added a comment - To have consistent behavior, the same should be valid for Criterion.and and Criterion.or
        Thomas Fox made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Thomas Fox made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Thomas Fox made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        21m 11s 1 Thomas Fox 12/Nov/12 20:28
        Resolved Resolved Reopened Reopened
        1h 22m 1 Thomas Fox 12/Nov/12 21:51
        Reopened Reopened Resolved Resolved
        22h 44m 1 Thomas Fox 13/Nov/12 20:36
        Resolved Resolved Closed Closed
        110d 3m 1 Thomas Fox 03/Mar/13 20:39

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development