[ 
https://issues.apache.org/jira/browse/JDO-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15337814#comment-15337814
 ] 

Andy Jefferson commented on JDO-751:
------------------------------------

Comments from cursory scan of the patch
1. You use a transient PC object passed in to a query. As per JDO spec 
assertion 14.6.2-44 "Comparisons between persistent and non-persistent 
instances return not equal". Do not use a transient PC object (which has no 
"id" as such), use detached or persistent-clean if you want to judge equality.
2. Using date equality is error prone since some datastores (RDBMS) don't store 
the precise millisecs so any comparison may work or may not depending on the 
precise nature of JDBC driver, and RDBMS handling.
3. Using optional<PC>.optional<PC>.xxx is getting some way from what I would 
term "common use-case"

> 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)

Reply via email to