surinder-insonix / datanucleus-appengine

Automatically exported from code.google.com/p/datanucleus-appengine
0 stars 0 forks source link

Support JPQL Creator expression, and JDOQL new expression #177

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create any JPA compliant Entity using annotations
2. fire a creator expression query e.g. em.createQuery("SELECT new User
(id) from User u"); and execute it
3. You get an exception - 
org.datanucleus.store.appengine.query.DatastoreQuery$UnsupportedDatastoreOp
eratorException: Problem with query <SELECT new User(id) FROM User u>: App 
Engine datastore does not support operator 
org.datanucleus.query.expression.CreatorExpression.  

What is the expected output? What do you see instead?
I thought I will get User objects with only id populated, instead I get 
org.datanucleus.store.appengine.query.DatastoreQuery$UnsupportedDatastoreOp
eratorException: Problem with query <SELECT new User(id) FROM User u>: App 
Engine datastore does not support operator 
org.datanucleus.query.expression.CreatorExpression.  

What version of the product are you using? On what operating system?
Appengine 1.2.8 with Datanucleus-jpa-1.1.5.jar and geronimo-jpa_3.0_spec-
1.1.1.jar

Please provide any additional information below.
If you do not allow this, there can be possible performance problems. In 
real world application schenario, there are so many cases, where you have 
joins and you just want to get id and name from a joined table. With 
normal joins, the whole Object is retrieved (not in the above example), 
which is unnecessary, if you are not going to process all of the retrieved 
fields.

Original issue reported on code.google.com by bombaygo...@gmail.com on 21 Dec 2009 at 6:53

GoogleCodeExporter commented 8 years ago

Original comment by googleco...@yahoo.co.uk on 7 Aug 2011 at 3:20

GoogleCodeExporter commented 8 years ago

Original comment by googleco...@yahoo.co.uk on 7 Aug 2011 at 3:20

GoogleCodeExporter commented 8 years ago
Since SVN trunk now handles the result class and projection treatment using 
DataNucleus core capabilities, use of creator expressions in SELECT clause are 
now supported.

Original comment by googleco...@yahoo.co.uk on 28 Feb 2012 at 12:39