Skip to main content

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

Andreas,

"git clone http://git.eclipse.org/gitroot/eclipselink/eclipselink.runtime.git" should get you the source repo in read-only mode (cannot push back to eclipse directly).

I just created an M1 Milestone for 2.5.1 late June, I expect a M2 would be released late July or early August.  No date has been set for a 2.5.1 release yet, though that could change at any time.

Eric

On 2013-07-05, at 3:31 PM, Andreas Joseph Krogh <andreak@xxxxxxxxxxxx> wrote:

På fredag 05. juli 2013 kl. 20:59:27, skrev Guy Pelletier <guy.pelletier@xxxxxxxxxx>:
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 {

...
}
 
Thanks a lot, it works perfectly!
 
Looking forward to having this fixed so auto-applying converters for Scala's Option-types works with a minimum of code:-)
 
I cannot seem to find a source-repo anywhere, only nightly-releases. Is there a source-repo I can pull from and have the fix as soon as you get around to it?
 
Also, while I'm at it (I assume this fix goes into 2.5.1) are there any release-plans for 2.5.1?
 
Thanks!
 
--
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


Back to the top