0
votes

I curious about it is possible to update a specific version of @Node model using JackRabbit OCM? For example I have a DTO like this:

@Node(jcrMixinTypes = "mix:versionable")
public class Something implements Serializable {

    private static final long serialVersionUID = 6651266612240053364L;

    @Field(path = true)
    private String path;

    @Field
    private String xml;

    @Field
    private Long version;

    public String getPath() {
        return this.path;
    }

    public void setPath(final String path) {
        this.path = path;
    }

    public String getXml() {
        return this.xml;
    }

    public void setXml(final String xml) {
        this.xml = xml;
    }    

    public Long getVersion() {
        return this.version;
    }

    public void setVersion(final Long version) {
        this.version = version;
    }

}

And created multiple versions e.q. on path name: /abc Named: 'jcr:rootVersion', '1.0', '1.1'. How can I update all of these specific versions DTO content e.g. the xml property and save in the JackRabbit repository without creating new versions?

Thank you for your help in advance!

1

1 Answers

0
votes

You can't update previous versions. Why would you want to? They are there to preserve the changes.

Or if you don't want to create a new version every time you save then don't! Are you calling check[in/out/point]? Remove them so you only save changes to the current version.