I have a datasource containing 2 binary (blob) fields. I use DMI to populate both of them server-side (see http://forums.smartclient.com/showthread.php?p=70842 for background.)
One DMI issues an add/update request (containing blob1) to this datasource via DSRequest.execute. The other DMI intercepts that request and tries to add blob2 to the current request.
I use the same bit of code (in DMI 2) for both add and update operations
The add operation seems to work, but the update operation does not. SOME_ATTACHMENT is always null. I can see in the log that for some reason, everything makes it into the values map except SOME_ATTACHMENT:
Is there some problem with the way I'm approaching this, or is this some very strange bug?
One DMI issues an add/update request (containing blob1) to this datasource via DSRequest.execute. The other DMI intercepts that request and tries to add blob2 to the current request.
I use the same bit of code (in DMI 2) for both add and update operations
Code:
... byte[] decoded = Base64.decodeBase64(someString); InputStream someAttachment = new ByteArrayInputStream(decoded); request.getValues().put("SOME_ATTACHMENT", someAttachment); request.getValues().put("SOME_ATTACHMENT_FILENAME", someFilename); //and so on
Code:
=== 2011-08-15 15:56:20,768 [0-10] INFO SQLDataSource - [builtinApplication.null] Performing update operation with criteria: {ATTACHMENT_ID:"29"} values: {SOME_ATTACHMENT_FILENAME:"MyFile.swf"}
Comment