[ https://issues.apache.org/jira/browse/JDO-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16696196#comment-16696196 ]
Tilmann Zäschke edited comment on JDO-652 at 11/22/18 6:46 PM: --------------------------------------------------------------- I get a few compilation errors when trying to compile the generated {{QOptionalSample}} class (after adding {{@PersistenceCapable}} to {{org.apache.jdo.tck.pc.query.OptionalSample}}): {code:java} [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[42,70] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[43,72] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[44,75] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[45,74] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[52,70] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[53,72] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[54,75] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[55,74] error: cannot find symbol {code} It looks like it is creating expressions of type {{Optional<T>}} while it should should be {{Optional<Date>}} (or similar), for example in line 43: {code:java} this.optionalDate = new ObjectExpressionImpl<java.util.Optional<T>>(this, "optionalDate"); {code} The class fields is (correctly) defined as: {code:java} public final ObjectExpression<java.util.Optional<java.util.Date>> optionalDate; {code} Is there something else I should be doing? was (Author: tilmann): I get a few compilation errors when trying to compile the generated {{QOptionalSample}} class (after adding {{@PersistenceCapable}} to {{org.apache.jdo.tck.pc.query.OptionalSample}}): {code:java} [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[42,70] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[43,72] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[44,75] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[45,74] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[52,70] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[53,72] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[54,75] error: cannot find symbol [ERROR] \projects\workspace-zoo\JDO-trunk-commit\trunk\tck\target\generated-sources\annotations\org\apache\jdo\tck\pc\query\QOptionalSample.java:[55,74] error: cannot find symbol {code} It looks like it is creating expressions of type {{Optional<T>}} while it should should be {{Optional<Date>}} (or similar), for example in line 43: {code:java} this.optionalDate = new ObjectExpressionImpl<java.util.Optional<T>>(this, "optionalDate"); {code} The class fields is (correctly) defined as: {code:java} public final ObjectExpression<java.util.Optional<java.util.Date>> optionalDate; {code} Is there something else I should be doing? > Provision of a typesafe refactor-friendly query capability for JDOQL > -------------------------------------------------------------------- > > Key: JDO-652 > URL: https://issues.apache.org/jira/browse/JDO-652 > Project: JDO > Issue Type: New Feature > Components: api, specification, tck > Reporter: Andy Jefferson > Assignee: Michael Bouschen > Priority: Major > Fix For: JDO 3.2 > > Attachments: JDO-652-api-ifTheElse.txt, JDO-652-api-patch-Andy.txt, > JDO-652-patch4.txt, typesafe.patch, typesafe_manifest.patch > > > There are various querying capabilities of this type around. JPA2 has its > Criteria query API. Third party solutions like QueryDSL also exist, in its > case providing a JDOQL implementation (as well as JPQL, and HQL). We should > seriously consider introducing something along these lines in the JDO2.4 > timeframe. > There is a comparison of JPA Criteria with QueryDSL over at > http://source.mysema.com/forum/mvnforum/viewthread_thread,49 -- This message was sent by Atlassian JIRA (v7.6.3#76005)