AttributeConverter, column type mapping (DN5.2 + JPA + Rdbms)


stephane
 

Hello,

I'm mapping a field using a AttributeConverter. The data stored is a string (json format).

AttributeConverter<xxx,byte[]>
Works great on MySQL. It's mapped on a medium blob.

AttributeConverter<xxx,String>
Works, only if the json is less than 255 characters.
So I tried to specify the column size using @Column(name= "metadatas",length = 2048) on the corresponding field, but schema is generated with varchar(255).
Am I doing something wrong ? Is this just not yet supported ?

For MySQL I would prefer to use the JSON data type. So I specified the type using @Column(name= "metadatas",columnDefinition = "JSON") on the field, but schema is still generated with varchar(255).
Am I doing something wrong ? Is this just not yet supported ?

Thanks for your help
--
Stephane


Andy
 

This sample works fine for setting length of an attribute converter column using current code.