I'm using Micronaut Data JDBC and I have an issue.
I have a @MappedEntity for JDBC with a content field that is a String used in a JPA context as follows:
@Lob
@Column(name = "content")
private String content;
I need to migrate this code to JDBC and I need that this content will be persisted as a Lob as well in a PostgreSQL.
With the current code, I'm just able to store the content as a String.
Any idea of how could I achieve that?
For persisting the
Stringcontent as a LOB, what needs to be done is to annotate the field as follows:by doing this, PostgreSQL stores an ID in the
contentcolumn and the data is persisted in thepg_largeobjecttable as it was desired.