D
D
DeNissss44442021-05-14 11:13:47
Spring
DeNissss4444, 2021-05-14 11:13:47

How to make a variable of type String in the database get the type Text and not Varchar?

I have an Entity model for a blog post. When I write String text in my database, it creates a Varchar that has a 255 character limit. And I need it to get the type Text in the Varchar place in the database. Tell me how this is done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2021-05-14
@DeNissss4444

How to do this is described here https://www.baeldung.com/jpa-annotation-postgresql...
For example, using the @Lob or @Column(columnDefinition="TEXT") annotation on a text field in your model.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question