-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Description
Overview of the issue
In hibernate 6 @lob seems broken with TextBlob.
TextBlob/String should just remove the annotation to work or else you get this error
Caused by: org.postgresql.util.PSQLException: Bad value for type long : ../fake-data/blob/hipster.txt
For Blob/byte[] where the type used is clob (migrating from old JHipster) we should relace the annotation with @JdbcTypeCode(SqlTypes.BINARY) as migrating would be hard.
JHipster JDL
JDL definitions
application {
config {
baseName blobtest
applicationType monolith
packageName com.example.blobtest
authenticationType jwt
databaseType sql
devDatabaseType postgresql
prodDatabaseType postgresql
buildTool gradle
clientFramework angular
enableTranslation false
}
entities *
}
entity Document {
name String required
comment TextBlob
file Blob
}
- JDL is mandatory for bug reports. This will allow us to use automated tests and generate the broken sample using
jhipster from-issuecommand.
Motivation for or Use Case
Code just not working with TextBlob
Reproduce the error
Just generate and test
Related issues
Suggest a Fix
Remove @Lob from TextBlob and provide a good migration for old clob when generating if possible.
JHipster Version(s)
9.0.0 yes this a regression
Browsers and Operating System
- Tickets opened without reproduction steps or that doesn't follows the template recommendation will be closed.
- Checking this box is mandatory (this is just to show you read everything)