[ https://issues.apache.org/jira/browse/JDO-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15145294#comment-15145294 ]
Renato Garcia commented on JDO-751: ----------------------------------- {quote}I think it is related because auto-dereferencing means that you assume that the reference to the Optional cannot be null.{quote} Not necessarily, it depends on how you do it. It would be probably something {{orElse(null)}} rather then {{get()}} to be compatible with JDOQL handling of nulls. {quote}So how would one check for "empty"? Would the only possibility be via "isPresent()"?{quote} In a query? Either comparing to "empty" using a variable or calling "isPresent" if the method is implemented. {quote}I don't know. But, at least ideally, I'm not sure that the difficulty of implementing a feature in an RDBMS should guide the design of an API for object oriented persistence?{quote} Exercising the possible implementations is a good guidance of the practicality of the API and helps understand the trade-offs imposed by the API. > Support for Java8 Optional > -------------------------- > > Key: JDO-751 > URL: https://issues.apache.org/jira/browse/JDO-751 > Project: JDO > Issue Type: New Feature > Components: specification, tck > Reporter: Andy Jefferson > > java.util.Optional provides a feature that is available in other languages. > Since JDO 3.2 will be for Java8+ then it makes sense to add support for this > as a "supported persistable type" -- This message was sent by Atlassian JIRA (v6.3.4#6332)