[
https://issues.apache.org/jira/browse/JDO-751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilmann Zäschke updated JDO-751:
--------------------------------
Attachment: JDO-751-tck-patch-v5.txt
Latest patch for Optional test.
Date queries work now (the dates are now a week apart, using TIME, DATE, or
TIEMSTAMP doesn't seem to matter in this scenario).
Two issues remain (using the latest DN as of today, lunchtime):
1) Using persistent Optional objects as parameters and comparing them to NULL
fails:
{{java.sql.SQLSyntaxErrorException: Syntax error: Encountered "NULL" at line 1,
column 255.}}
Original query:
{{SELECT FROM org.apache.jdo.tck.pc.query.OptionalSample WHERE
this.optionalPC.orElse(pcParam) == null PARAMETERS
org.apache.jdo.tck.pc.query.OptionalSample pcParam}}
Database query:
{{Exception thrown when executing query : SELECT
'org.apache.jdo.tck.pc.query.OptionalSample' AS
NUCLEUS_TYPE,A0.ID,A0.OPTIONAL_DATE,A0.OPTIONAL_INTEGER,A0.OPTIONAL_STRING FROM
APPLICATIONIDENTITY0.OPTIONALSAMPLE A0 WHERE (CASE WHEN NOT (A0.OPTIONAL_PC IS
NULL) THEN A0.OPTIONAL_PC ELSE ? END) = NULL}}
2) I left the failing {{"SELECT FROM org.apache.jdo.tck.pc.query.OptionalSample
WHERE !(optionalPC.optionalPC.isPresent())"}} in the test for the moment, see
discussion in MoM from telecon yesterday. I can update this once it has been
clarified.
> 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-v5.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)