Cayenne
  1. Cayenne
  2. CAY-1657

Expression: in-memory comparison requires persistent to be in the same context as exp parameters to match

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1M3
    • Fix Version/s: 3.1B1
    • Component/s: None
    • Labels:
      None

      Description

      Artist a1 = // object from context1
      Expression e = ExpressionFactory.matchExp(Painting.ARTIST_PROPERTY, a1);

      Painting p2 = // object from context 2
      assertTrue(e.match(p2));

      The last assertion is always false, even though p2 may point to a1's clone in context2... This is inconsistent with using expressions as qualifiers - qualifier parameters that are instances of Persistent can reside in any context - matching works in a context-agnostic way.

      I am sure this affects ALL versions of Cayenne, but my testing is done on 3.1 M3/M4

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        3d 2h 33m 1 Olga Tkacheva 30/Jan/12 16:07
        Olga Tkacheva made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 3.1M4 [ 12317958 ]
        Resolution Fixed [ 1 ]
        Hide
        Olga Tkacheva added a comment -

        fixed. added tests

        Show
        Olga Tkacheva added a comment - fixed. added tests
        Andrus Adamchik made changes -
        Summary Expression: In memory comparion requires persistent to be in the same context to match Expression: in-memory comparison requires persistent to be in the same context as exp parameters to match
        Andrus Adamchik made changes -
        Field Original Value New Value
        Affects Version/s 3.1M3 [ 12316228 ]
        Description
        Artist a1 = // object from context1
        Expression e = ExpressionFactory.matchExp(Painting.ARTIST_PROPERTY, a1);

        Painting p2 = // object from context 2
        assertTrue(e.match(p2));

        The last assertion is always false, even though p2 may point to a1's clone in context2... This is inconsistent with using expressions as qualifiers - qualifier parameters that are instances of Persistent can reside in any context - matching works in a context-agnostic way.

        Artist a1 = // object from context1
        Expression e = ExpressionFactory.matchExp(Painting.ARTIST_PROPERTY, a1);

        Painting p2 = // object from context 2
        assertTrue(e.match(p2));

        The last assertion is always false, even though p2 may point to a1's clone in context2... This is inconsistent with using expressions as qualifiers - qualifier parameters that are instances of Persistent can reside in any context - matching works in a context-agnostic way.

        I am sure this affects ALL versions of Cayenne, but my testing is done on 3.1 M3/M4
        Andrus Adamchik created issue -

          People

          • Assignee:
            Andrus Adamchik
            Reporter:
            Andrus Adamchik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development