title: How can I get the property of an older version of a node in jackrabbit?
body: <p>I have created the node and created 3 versions.</p>
  
  <pre><code>String path = "/my111";
  MyClass m1  = new  MyClass();
  m1.setPath(path);
  m1.setName("Myname");
  m1.setLanguage("English");      
  ocm.create(m1);
  ocm.save();     
  
  for (int i = 0; i &lt; 4; i++) {
   ocm.checkout(path);
   m1.setName("mz676666" + i);
   ocm.update(m1);
   ocm.save();
   ocm.checkin(path);         
    } 
  
   VersionIterator iterator = ocm.getAllVersions(path);
   while (iterator.hasNext()) {
        Version version = (Version)iterator.next();
         System.out.println("version::"+version.getName());           
  }
  
  
  Output :
  
  version::jcr:rootVersion
  version::1.0
  version::1.1
  version::1.2
  version::1.3
  </code></pre>
  
  <p>Now i want to get the <code>name</code> of a version <code>1.2</code> ..</p>
  
  <p>I tried it through </p>
  
  <pre><code>org.apache.jackrabbit.ocm.version.VersionIterator iterator = ocm.getAllVersions(path);
      while (iterator.hasNext()) {
          Version version = (Version)iterator.next();
          System.out.println("version::"+version.getName());
  
      MyClass m1 = (MyClass) ocm.getObject(path, version.getName());
      System.out.println(m1.getName());  // But it always print `null`. Why??
  }
  </code></pre>
  
  <p>Can it is possible to fire query and fetch the data?</p>
  
  <p>How i can achieve this?</p>
  
  <p>Please answer this. </p>
  
  <p>Thanks in advance. </p>