[ https://issues.apache.org/jira/browse/JDO-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15338646#comment-15338646 ]
Tilmann Zäschke commented on JDO-751: ------------------------------------- Thanks for the feedback. 1. Yes, you are right, and I do not expect the passed in persistent object to be equal to any database object. It is only compared to itself (which should return 'equal') and to 'null' (which should return 'not equal') 2. Okay, but I would expect the query engine of an DBMS to take care of that and apply the same 'truncation' to query parameters as it applies to stored values. So in the worst case it should return additional results that have a very similar timestamp, or not? The two dates that I use are over 15 minutes apart, so I wouldn't expect a problem here. I can adjust this if this turns out to be a problem. 3. Hmm, I think if {{ref.ref.id}} is common and use of Optional becomes common, then {{optional.optional.id}} may also become common ... . As simple example would be a family database where I want to find all grandchildren of a person via {{father.father.id == 33}} (and 3 similar queries). A separate question (discussed in the meeting) is whether we really want to have {{orElse}} in WHERE clauses, or whether we should limit it to SELECT clause. For SELECT clauses we at least have a good use case (provided by Andy), for WHERE we don't really have that yet. > 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 > Fix For: JDO 3.2 > > Attachments: JDO-751-tck-patch-v4.txt > > > 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)