Using VARCHAR or TEXT as the default string display in OpenJPA

By default, the OpenJPA postgres dictionary generates VARCHAR(255) for String fields without a specified length. Can it be configured to generate VARCHAR or TEXT instead for all such fields, so I don't need to repeat @Column(columnDefinition = "TEXT") everywhere? Of course, if the length is set explicitly, for example. @Column(length = 128) , the result should be VARCHAR(128) . In this case, are other JPA providers allowed?

+6
source share
1 answer

Hibernate seems to support this with 3.6: 6.5. Type of registry . This issue is tracked by JIRA: HHH-5138 .

+2
source

Source: https://habr.com/ru/post/917637/


All Articles