[
https://issues.apache.org/jira/browse/OCM-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jukka Zitting moved JCR-1973 to OCM-12:
---------------------------------------
Component/s: (was: jackrabbit-ocm)
Issue Type: Bug (was: Improvement)
Affects Version/s: (was: 1.5.2)
Workflow: no-reopen-closed, patch-avail (was: jira)
Key: OCM-12 (was: JCR-1973)
Project: Jackrabbit OCM (was: Jackrabbit Content Repository)
> OCM search features should retrieve objects also from VersionHistory objects
> ----------------------------------------------------------------------------
>
> Key: OCM-12
> URL: https://issues.apache.org/jira/browse/OCM-12
> Project: Jackrabbit OCM
> Issue Type: Bug
> Reporter: Gerald Reinhart
> Priority: Minor
>
> @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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.