Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Converters for non-basic types

Hi Andreas,

The thing we have that is closest to what you are looking for is a WrapperPolicy on our ClassDescriptor. (and I have to admit I haven't tried to solve your particular problem with it)

With WrapperPolicy, you could define an implementer of our WrapperPolicy interface and get called back when objects are being built and disassembled in order to return an object EclipseLink is aware of from one that EclipseLink is not aware of.

-Tom

On 01/06/2013 5:31 PM, Andreas Joseph Krogh wrote:
På fredag 31. mai 2013 kl. 20:48:39, skrev Tom Ware <tom.ware@xxxxxxxxxx
<mailto:tom.ware@xxxxxxxxxx>>:

    Hi Andreas,

        I'm afraid I don't know Scala.  Can you give a description of what you are
    hoping for.

        We don't have converters on xToOne relationships, but I am trying to figure
    out if there is something we can do in our event framework to deal with the
    issue.

Scala's Option is a bit like JAVA8's Optional
(http://download.java.net/jdk8/docs/api/java/util/Optional.html) and is a
container which may hold a value.
It would be very cool if one could write (with JAVA8's Optional):
@ManyToOne
private Optional<Project> project = Optional.empty()
This way one won't have to care about null-reference.
--
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