Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question