Hi Andreas,
The bug you are listing refers to attributes that are not
mapped. It appears you are experiencing this issue with
attributes that are mapped. The idea is that we use this
_persistence_new() method to get a more efficient creation of
the object and then use our knowledge of the mapped attributes
to copy them or populate them. For transient fields, we cannot
do that - hence the bug and its fix.
How are the converters you are seeing NPEs in defined? Do
they check attributes other than the ones they are converting in
their conversion code? Can you provide a sample including a
stack trace, the converter, the object being converted and any
relevant mappings.
In my specific case I'm having a field mapped as (in
Scala-code) Option[DateTime] and have a converter for it. This
field is never null, but rather None (for not set) and
Some(DateTime) if set. The constructor sets the field to None
and there's no way one programmatically can set the field to null.
Therefore I don't check for null in my converter (or
any other place using that Option-field, which is the whole
purpose of using Option), because it's either None or Some,
except in this particular case where _persistence_new() is used
which bypasses any initialization-code.
Is there a way to prevent EL from using _persistence_new() ?
It will take some time to produce an example showing this as
I'm working towards a deadline, but I'll try.
Thanks.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users