DEV Community

Discussion on: JPA and PostgreSQL text

Collapse
 
denismagda profile image
Denis Magda

Good cheatsheet!

Quick question. When you labeled the field this way:

@Lob
    private String name;
Enter fullscreen mode Exit fullscreen mode

it's said that the DDL was as follows:

create table unlimited_text (
       id int8 not null,
        name text,
        primary key (id)
    )
Enter fullscreen mode Exit fullscreen mode

Shouldn't the type of the name filed be oid in that case?

Collapse
 
belyaevandrey profile image
Andrey Belyaev

Probably it should be. In my case it is oid, not text. I use Hibernate 5.6.9.Final and PostgreSQL driver 42.3.5

Collapse
 
franckpachot profile image
Franck Pachot

Thanks Andrey, yes seems it has been finally fixed in 5.6.2

hibernate.atlassian.net/browse/HHH...