I assume that the problem I am experiencing is something different from what I described.
When a Blob is created, it is supposed to be assigned to a property. This, in turn, will create a BinaryPropertyState to represent the assignment. As long as the change is not committed into the repository, the blob can't be retrieved that way. Even then, some implementations of NodeStore don't support getBlob() at all - they always return null. In which conditions can I use createBlob() and getBlob() without assigning a Blob to a property, and before committing the current session? More importantly, is this use case supported at all? 2015-01-07 20:21 GMT+01:00 Michael Dürig <[email protected]>: > > > On 7.1.15 6:07 , Francesco Mari wrote: >> >> The problem is that Blob.getReference() always return null, because >> the actual implementation (ArrayBasedBlob) doesn't override that >> method from AbstractBlob. >> >> Is this behavior expected? Am I doing something wrong or misusing the API? > > > The general contract says "Returns a secure reference to this blob, or null > if such a reference is not available." So technically this is not a bug. The > reason for returning null is probably because no one came up with the need > for a more sophisticated implementation yet. > > Michael
