Hi Zeyad,

I have no experience with json type persistent properties, but I would add a 
custom converter
@Convert(converter = JsonToMyTypeConverter.class) implements AttributeConverter 
(convertToDatabaseColumn, convertToEntityAttribute) and specify a java class 
which represents the json structure.
However json datatype I already using for datatables in Fineract. Datatable 
extension is coming with a PR soon.
We used json and not jsonb because the speed of the insert was the most 
important for us (and we did not need indexing and searching…)
Added new APiFieldType json and JdbcJavaType was extended with JSON type. It is 
working without any problem.

Cheers,
Marta


> On 5 Sep 2024, at 21:37, Zeyad Nasef <zeyad.nasef....@gmail.com> wrote:
> 
> Hello everyone, 
> I hope you are doing well.
> 
> I’m currently working on a JPA entity that needs to store information in JSON 
> format using a JSONB column in a PostgreSQL database. While researching, I 
> came across several tutorials that rely on the hibernate-types dependency 
> from com.vladmihalcea, which is specifically designed for Hibernate. 
> However, since we exclude the Hibernate group and use EclipseLink instead, 
> I’m looking for an alternative approach to map a JSONB column to an entity 
> attribute.
> 
> Any guidance, code samples, or even pointers to relevant resources would be 
> immensely appreciated.
> 
> Thank you!

Reply via email to