[
https://issues.apache.org/jira/browse/JDO-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675755#comment-16675755
]
Michael Bouschen commented on JDO-652:
--------------------------------------
Thanks for the feedback, I did not know that I have to use DataNucleus 5.2.
The test case issues are fixed.
I changed QueryTest.executeJDOQLTypedQuery to check both whether there is a
resultClass and/or a result clause specified in order to decide which
executeResultXXX method is called.
I also added a new method to Expression to define an alias for an expression:
{noformat}
/**
* Method to return an expression with the specified alias assigned to this
expression.
* @param alias the alias for this expression
* @return the expression with an alias
*/
Expression as(String alias);{noformat}
With the above changes there is only one error in query.conf, method
IfElseResult.testPositive1. Exceuting the query results in
{noformat}
ERROR 22003: The resulting value is outside the range for the data type
DECIMAL/NUMERIC(31,31){noformat}
This is the generated SQL query:
{noformat}
SELECT (CASE WHEN ((SELECT COUNT(*) FROM DATASTOREIDENTITY0.PROJECT_MEMBER
A0_SUB WHERE A0_SUB.PROJID = A0.DATASTORE_IDENTITY) > 2) THEN (A0.BUDGET *
1.1999999999999999555910790149937383830547332763671875) ELSE (A0.BUDGET *
1.100000000000000088817841970012523233890533447265625) END), A0.PROJID AS
NUCORDER0 FROM DATASTOREIDENTITY0.PROJECTS A0 WHERE A0.DISCRIMINATOR =
'org.apache.jdo.tck.pc.company.Project' ORDER BY NUCORDER0{noformat}
> 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)