#Data truncation Data too long for column in Java spring data jpa even if I use BLOB

7 messages · Page 1 of 1 (latest)

plush cargo
#

Hey everyone, I'm getting files from a rest service and saving it into a db (sql), I'll save it later in filesystem and just reference them from the db, anyway even if the file is 100k and I put BLOB on the @columnDefinition and dataType in the db it still gives me an error

wind vigilBOT
#

This post has been reserved for your question.

Hey @plush cargo! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

plush cargo
#

I solved the problem, I defined the variable as String but BLOB wants byte[]

#

since this change in posts it seems that less people answer 😦

#

maybe it's just a feeling

#

ty everyone the same I wish you merry christmas!