By default, OpenJPA's postgres
dictionary generates VARCHAR(255)
for String
fields without stated length. Can it be set up to generate VARCHAR
or TEXT
instead for all such fields, so that I don't need to repeat @Column(columnDefinition = "TEXT")
everywhere? Of course, if the length is given explicitly, e.g. @Column(length = 128)
, the result should be VARCHAR(128)
. For that matter, do any other JPA providers allow this?
It seems that Hibernate supports this since 3.6: 6.5. Type Registry. Tracked by this JIRA issue: HHH-5138.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With