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

På fredag 31. mai 2013 kl. 20:48:39, skrev Tom Ware <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
 

Back to the top