Reputation: 752
I am struggling with inserting a blob, using MySQL. I notice ORMLite creates the corresponding column with DataType BLOB, while I require a LONGBLOB, since I get an exception thrown telling me
Data too long for column
I annotate the column:
@DatabaseField(dataType = DataType.BYTE_ARRAY)
What options are left, besides running a rawQuery when creating the table?
Upvotes: 0
Views: 333
Reputation: 752
Oh ok, I got this. I have to add the following:
@DatabaseField(dataType = DataType.BYTE_ARRAY, columnDefinition = "LONGBLOB")
Upvotes: 1