Re: Errors saving to BLOB via ClusterJ
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;
@PersistenceCapable(table="blobtypes")
@PrimaryKey(column="id")
public interface BlobTypes extends IdBase {
int getId();
void setId(int id);
@Lob
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,
Craig
Subject
Views
Written By
Posted
2260
March 09, 2012 09:23AM
1241
March 09, 2012 09:51AM
Re: Errors saving to BLOB via ClusterJ
1322
March 09, 2012 03:19PM
1441
March 16, 2012 01:41PM
997
March 21, 2012 09:18AM
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.