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

Tilmann Zäschke commented on JDO-751:
-------------------------------------

As mentioned in the telecon, I found that the query {{"!(optionalPC != null)"}} 
(where optionalPC is a field of type {{Optional<PC>}}) causes an SQL error: 

{{java.sql.SQLSyntaxErrorException: Syntax error: Encountered "NOT" at line 1, 
column 185.}}

The generated query looks as follows:

{{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 NOT NOT (A0.OPTIONAL_PC IS NULL)}}

This is presumably due to the {{NOT NOT}} near the end.


> 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-v2.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