Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Another converter-bug

Hi Andreas,

I pin pointed the problem internally and will look to have a fix in place soon.

In the mean time, using this descriptor customizer will get you past the error.

package no.officenet.example.eclipselink.autoconvert;

import java.sql.Timestamp;

import org.eclipse.persistence.config.DescriptorCustomizer;
import org.eclipse.persistence.descriptors.ClassDescriptor;
import org.eclipse.persistence.internal.jpa.metadata.converters.ConverterClass;
import org.eclipse.persistence.mappings.DirectToFieldMapping;

public class CarCustomizer implements DescriptorCustomizer {

    public CarCustomizer() {}

    @Override
    public void customize(ClassDescriptor desc) throws Exception {
        DirectToFieldMapping mapping = (DirectToFieldMapping) desc.getMappingForAttributeName("modified");
       
        mapping.setConverter(new ConverterClass(OptionalJodaDateTimeConverter.class.getName(), false, Timestamp.class.getName(), false));
    }

}


@Entity
@Table(name = "car")
@Customizer(CarCustomizer.class)
public class Car {
...
}

Cheers,
Guy

On 05/07/2013 10:34 AM, Andreas Joseph Krogh wrote:
På fredag 05. juli 2013 kl. 16:33:44, skrev Guy Pelletier <guy.pelletier@xxxxxxxxxx>:
Sure, I'll have a look and get back to you as soon as I can.
 
Coolio!
 
--
Andreas Joseph Krogh <andreak@xxxxxxxxxxxx>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
 


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

--

Oracle
Guy Pelletier

ORACLE Canada, 45 O'Connor Street Suite 400 Ottawa, Ontario Canada K1P 1A4

Green
            Oracle Oracle is committed to developing practices and products that help protect the environment


Back to the top