joschaBurkholz / jpa-attribute-converter

Library to convert Java objects into human readable values in database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jpa-attribute-converter

Summary

Use the jpa-attribute-converter to convert between Java objects (for now java.time.year) and the presentation in a database.
Since Hibernate would store the serialized object, it is hard to debug.

Usage

import java.time.Year;
import javax.persistence.Entity;
import javax.persistence.Convert;
 
import de.joscha_burkholz.jpa_attribute_converter.YearConverter;
 
@Entity
public class MyEntity {
 
    @Convert(converter = YearConverter.class)
    private Year year;
    
    // getter/setter omitted
}

About

Library to convert Java objects into human readable values in database


Languages

Language:Java 100.0%