[
https://issues.apache.org/jira/browse/JDO-652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682985#comment-16682985
]
Michael Bouschen commented on JDO-652:
--------------------------------------
I added some more test cases, because the new DataNucleus version supports
queries that ran into an Unsupported OperationException before.
However I still have a problem with a cast Expression. Suppose a query with the
following result:
{noformat}
query.setResult("MAX(((FullTimeEmployee)manager).salary)");{noformat}
I tried the following JDOQLTypedQuery code:
{noformat}
QFullTimeEmployee cast =
(QFullTimeEmployee)cand.manager.cast(FullTimeEmployee.class);
query.result(false, cast.salary.max());{noformat}
But it fails with an ClassCastException:
org.datanucleus.api.jdo.query.PersistableExpressionImpl cannot be cast to
org.apache.jdo.tck.pc.company.QFullTimeEmployee.
Any idea?
> 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)