Uploaded image for project: 'Jackrabbit OCM'
  1. Jackrabbit OCM
  2. OCM-12

OCM search features should retrieve objects also from VersionHistory objects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      @Node(jcrMixinTypes = "mix:versionable")
      public class MyObject {
      private String path;
      private String foo;
      // other attributes, getters and setters follows ...
      }

      -check in many versions of this object differing for the value
      of "foo" attribute (ie: "bar", "dummy", "lazy", etc...)
      -retrieve one of them searching for it's "foo" value.
      Example:

      MyObject myobject = new MyObject();
      myobject.setPath("/itsme");
      myobject.setFoo("bar");
      ocm.insert(myobject);
      ...
      myobject.setFoo("dummy");
      ocm.checkout("/itsme");
      ocm.update(myobject);
      ocm.checkin(myobject);
      ...
      myobject.setFoo("lazy");
      ocm.checkout("/itsme");
      ocm.update(myobject);
      ocm.checkin(myobject);
      ...

      Filter f1 = qm.createFilter(MyObject.class);
      f1.addEqualTo("foo", "lazy");
      MyObject o = (MyObject) ocm.getObject(qm.createQuery(f1)); // This works!
      ...
      Filter f2 = qm.createFilter(MyObject.class);
      f2.addEqualTo("foo", "bar");
      MyObject o = (MyObject) ocm.getObject(qm.createQuery(f2)); // This
      returns "null"
      ...

      The Query do not scan different versions of the object MyObject.

      See original discussion : http://www.nabble.com/OCM%2C-queries-and-version-history-tt21459838.html

      Attachments

        Activity

          People

            Unassigned Unassigned
            greinhart Gerald Reinhart
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: