Skip to content

Library to convert Java objects into human readable values in database

Notifications You must be signed in to change notification settings

joschaBurkholz/jpa-attribute-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages