[ 
https://issues.apache.org/jira/browse/JCR-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15351508#comment-15351508
 ] 

Tony Rozga commented on JCR-2369:
---------------------------------

This problem still exists for me in 2.12.2.  Session.importXML puts binaries in 
the DataStore, Workspace.importXML does not.

I looked at the test originally attached and it doesn't appear to test if the 
binary value is in the DataStore.   I can't remember where I learned this trick 
but we use this for our ETags:

String etag = (value instanceof JackrabbitValue) ? 
((JackrabbitValue)value).getContentIdentity() : null;
if (null == hash) {
    // not in the datastore?
    if (content.hasProperty(Property.JCR_LAST_MODIFIED)) {
        long t = 
content.getProperty(Property.JCR_LAST_MODIFIED).getDate().getTimeInMillis();
        etag = DigestUtils.md5Hex(Long.toString(t));
    }
}

> Problem importing node with binary property in a repository configured with 
> datastore
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-2369
>                 URL: https://issues.apache.org/jira/browse/JCR-2369
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.6
>            Reporter: Luca Tagliani
>            Assignee: Thomas Mueller
>            Priority: Minor
>             Fix For: 1.6.1
>
>         Attachments: testBug.zip
>
>
> Using the importXML method of workspace to import some node containing binary 
> properties the nodes are imported correctly and the value of the binary data 
> property is imported
> However the binary data goes to the db (persistenceManager) an not to the 
> datastore.
> Creating a new node of the same type using the api, the binary data go to the 
> datastore.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to