I encountered a bug when creating an init script from the java classes for flyway with a postgresql database. If you have an attribute of type string with the @Lob annotation jpa buddy creates a script with the attribute of type TEXT. Hibernate expects this to be of type oid because postgresql stores large objects in a separated table.
IntelliJ IDEA 2022.2.1 (Ultimate Edition); JPA Buddy2022.5.2-222; Spring Boot 2.7.7; flyway 9.10.2; Postgresql 15.1
What should I do to make it generate OID?
CodePudding user response:
- Open Type Mappings Settings (Tools -> JPA Buddy -> Database Versionong -> Type Mappings)
- Select postgresql type
- Add custom Mapping Type for the
jakarta.persistence.Lob
orjavax.persistence.Lob
orjava.lang.LobString
and mapping tooid
SQL type