MySQL Forums
Forum List  »  NDB clusters

Re: Errors saving to BLOB via ClusterJ
Posted by: Craig Russell
Date: March 09, 2012 03:19PM

Hi Jacek,

Not a bug but a feature request.

The way to tell clusterj to use BLOB or TEXT methods is to annotate the field with the @Lob annotation. You can see an example of this in the test class BlobTypes:

import com.mysql.clusterj.annotation.Lob;

public interface BlobTypes extends IdBase {

int getId();
void setId(int id);

byte[] getBlobbytes();
void setBlobbytes(byte[] value);

Try adding the annotation to either the byte[] or String field and see if that helps.

I've also implemented the automatic detection of Lob if you map to a BLOB or TEXT column, and this change will allow you to omit the @Lob annotation. Look for it in an upcoming release.

Thanks for the suggestion,


Options: ReplyQuote

Written By
Re: Errors saving to BLOB via ClusterJ
March 09, 2012 03:19PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.