I am not able to call manager.find(entity) method with an entity containing a type that is a byte[] and has a lenght greater than a tinyblob.
If i define my entity variable like this:
private byte[] data;
or like this:
@Column(length=200)
private byte[] data;
I dont’ have any problems, but hibernate set the type of the column as tinyblob, too small for my purposes.
So if i try to Increase the dimension in this way:
@Column(length=200)
private byte[] data;
or even in this way:
@Lob
private byte[] data;
i get this exception org.hibernate.mappingexception: No Dialect mapping for JDBC type: -4. I tried to set various dialects in my persistence.xml but i get always the same problem 🙁
The exception is thrown at runtime when i call manager.find method, when i start the server the column is a BLOB/MEDIUMBLOB/LONGBLOB as it was supposed to be
Thank you!
Found the bug, the exception was thrown before the method manager.find, during the calling of createNativeQuery. i had to add addScalar(“data”, Hibernate.BLOB)