[ https://issues.apache.org/jira/browse/JDO-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15154475#comment-15154475 ]
Craig L Russell commented on JDO-751: ------------------------------------- I'd like to think how to accommodate object databases, where the user really wants to distinguish three cases in the datastore: Case 1. Null value Case 2. Empty value Case 3. Present value I think that a straight mapping that preserves the three cases is in alignment with the specification. How to distinguish them in JDOQL might be simple. Case 1. prop == null Case 2. !prop.isPresent() Case 3. prop.isPresent() Using the shorthand age == 7 would mean (age.isPresent() && age.get()==7) Is that good enough? > 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)