Hi all,
I'm trying to use the :import operation in combination with versioning but I
can't get it to run properly.
What I'm trying to achieve is submitting 2 curl :import operations. The first
one creates a new object, the second one should create a new version by
modifying a property:
curl -u admin:admin -F":operation=import" -F":contentType=json"
-F":content={'person1':{'jcr:primaryType':'nt:unstructured','jcr:mixinTypes':['mix:versionable'],
'surname':'aaa'}}" -F":replaceProperties=true" -F":checkin=true"
-F":autoCheckout=true" http://localhost:4502/content/people
curl -u admin:admin -F":operation=import" -F":contentType=json"
-F":content={'person1':{'jcr:primaryType':'nt:unstructured','jcr:mixinTypes':['mix:versionable'],
'surname':'bbb'}}" -F":replaceProperties=true" -F":checkin=true"
-F":autoCheckout=true" http://localhost:4502/content/people
Note that only 'surname':'aaa' and 'surname':'bbb' is changing between requests.
The first requests works as expected, creates the node and check it in. The
problem resides in the second request where I receive the error "
javax.jcr.version.VersionException: Unable to perform operation. Node is
checked-in."
It looks like the :autoCheckout option is not being taken into consideration.
I've also set to true the "Auto checkout nodes" option in the Apache Sling Post
Servlet configuration.
Any hint on what I'm doing wrong or how I could get this to work?
Many thanks in advance
Xavi