@@ -0,0 +1,1250 @@
+package ch.wisv.payments.util;%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.IOException;%0Aimport java.io.ObjectInputStream;%0Aimport java.sql.Timestamp;%0Aimport java.time.LocalDateTime;%0Aimport javax.persistence.AttributeConverter;%0Aimport javax.persistence.Converter;%0A%0A@Converter(autoApply = true)%0Apublic class LocalDateTimeAttributeConverter implements AttributeConverter%3CLocalDateTime, Object%3E %7B%0A%0A    @Override%0A    public Object convertToDatabaseColumn(LocalDateTime locDateTime) %7B%0A        return locDateTime == null ? null : Timestamp.valueOf(locDateTime);%0A    %7D%0A%0A    @Override%0A    public LocalDateTime convertToEntityAttribute(Object sqlTimestamp) %7B%0A        if (sqlTimestamp != null) %7B%0A            try %7B%0A                byte%5B%5D dbBytes = (byte%5B%5D) sqlTimestamp;%0A                ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(dbBytes));%0A                LocalDateTime covertedDateFromBytes = (LocalDateTime) ois.readObject();%0A                ois.close();%0A                return covertedDateFromBytes;%0A            %7D catch (IOException ioe) %7B%0A                ioe.printStackTrace();%0A            %7D catch (ClassNotFoundException cnfe) %7B%0A                cnfe.printStackTrace();%0A            %7D%0A        %7D%0A        return null;%0A    %7D%0A%7D

add converter for localdatetime bug of jpa 2.1