79250281

Date: 2024-12-04 08:07:36
Score: 2
Natty:
Report link

Is there a way to configure Hibernate 6.4 to store these fields in a text column directly, without using Large Object storage.

The simplest way, if you want to convert this MyExternalizableType to json|jsonb|text for storage. Is to use the io.hypersistence:hypersistence-utils-hibernate-xx library.

Note: io.hypersistence:hypersistence-utils-hibernate-63 with hibernate-core:6.4.

@Column(name = "json_data", columnDefinition = "text")
@Type(JsonType.class) // import io.hypersistence.utils.hibernate.type.json.JsonType;
private MyExternalizableType jsonData;


and without modifying the model classes?

The Externalizable interface may not necessary in such cases(I think).

Reasons:
  • Blacklisted phrase (1): Is there a way
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is there a
  • Low reputation (1):
Posted by: honhim