Class SimpleJsonbConverter
- java.lang.Object
-
- de.terrestris.shoguncore.hibernate.SimpleJsonbConverter
-
public class SimpleJsonbConverter extends Object implements javax.persistence.AttributeConverter<Map<String,String>,String>
A JPA converter that can be used to convert jsonb fields into a map. Currently only works with 'simple' json content (only one level objects like {"name": "peter", "someprop": 345}).Please note that you'll need to switch to pgjdbc-ng from https://github.com/impossibl/pgjdbc-ng instead of using the standard postgres driver.
Please also note that if you want optimal performance you'll need to add an index manually, hibernate can only create btree indexes.
-
-
Constructor Summary
Constructors Constructor Description SimpleJsonbConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringconvertToDatabaseColumn(Map<String,String> attribute)Map<String,String>convertToEntityAttribute(String dbData)
-