|@Lob @Column (length=16777215) doesn't work with MySql to get a MEDIUMBLOB [message #388441]
||Fri, 29 May 2009 05:46
| Martin Dames
Registered: July 2009
I have a simple Table where one column should be from type LOB. I want to
store some picture data.
When Im connecting to MySQL with EclipseLink (JPA), it creates the tables
automatically and set the right column type for MySQL. But it just creates
columns from type BLOB (which is limited to 64kb in MySQL) and not
MEDIUMBLOB (which would be sufficient for my images).
One solution I found is to set the column length to a size greater than
64kb (see example below) so that EclipseLink (JPA) would create a column
from type MEDIUMBLOB if it is connected to MySQL automatically. This
doesn't work... it just creates columns from type BLOB, doesn't matter
which length im defining for the column.
I triple checked if the tables are being created by JPA, old and not
dropped tables are not the error.
Is this a bug? Thank you.
My annotated entity attribute:
@Column (length=16777215, name="IMAGE") // length for mysql mediumblob
private byte mymage;
Powered by FUDForum
. Page generated in 0.16179 seconds