Skip to main content

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

Yes I agree this is a bug and is most likely related to the previous converter bug (from the start Eclipselink is just not handling the generic attribute type correctly).

Unfortunately no, you'll need a descriptor customizer for each entity and in there you can set a converter for each mapping from that entity that requires it.

Cheers,
Guy


On 05/07/2013 10:03 AM, Andreas Joseph Krogh wrote:
På fredag 05. juli 2013 kl. 15:50:28, skrev Guy Pelletier <guy.pelletier@xxxxxxxxxx>:
One thing to try would be to add a descriptor customizer. In it you would set a new converter on the mapping with the correct field/attribute classfications.

e.g. mapping.setConverter(new ConverterClass(CustomOption<DateTime>.class.getName(), false, Timestamp.class.getName(), false));

Information on configuring a descriptor customizer is here:

http://wiki.eclipse.org/Configuring_a_Descriptor_%28ELUG%29#Configuring_a_Descriptor_Customizer_Class
 
You agree this is a bug in EL and that it should work right?
 
Will such a descriptor-cusomtizer be re-useable across all attributes of that type? I'd rather not implement a descriptor-customizer for each attribute in each entity where I use an attribute of type CustomOption<DateTime>, and other optional-types I use.
 
(In my real project I use Scala and have many optional-types wraped in Option[T], but for the example and bug-reports I use the CustomOption type and JAVA)
 
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

--

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