When I'm synchronizing image from android to server, it throws this exception:
data truncation: data too long for column
@DatabaseField(dataType = DataType.BYTE_ARRAY) private byte PERSON_IMAGE;
I am using ormlite for android and the image is saved correctly. I also extract the DB of android on emulator and the image is of type blob in db.
@Column(name = "PERSON_IMAGE", columnDefinition = "BLOB") @Basic(fetch = FetchType.EAGER) @Lob @XmlElement byte personImage;
I am using hibernate 4.1.3 to persist in mysql DB. My schema is autogenerated by hibernate. The image is also of type blob in mysql. Glad if you can help to sort this out. The exception is throws only when it persists in mysql.