zenmeso / objectify-appengine

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

Projection query doesn't work with number properties #215

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Save an entity with a number property.
In this example 'someNumber' property of 'Trivial' entity is type long.

2. Build a projection query on 'someNumber' property and try to load it:
List<Trivial> projected = ofy().load().type(Trivial.class)
                .project("someNumber").list();

3. Get error com.googlecode.objectify.LoadException: Error loading 
Trivial(123): Unsupported type: class java.lang.Number

What is the expected output? What do you see instead?
Expect projection query to run on number properties just like String properties.

What version of the product are you using? On what operating system?
Objectify 5.0.3
Ubuntu 14.04

Original issue reported on code.google.com by amir.h...@gmail.com on 12 Jul 2014 at 4:59

GoogleCodeExporter commented 9 years ago
Just ran into this as well, in local unit tests (LocalServiceTestHelper). In my 
case, I'm doing projection queries while specifying ancestor(). Stacktrace 
attached.
Objectify 5.0.3
Windows 7

Original comment by vi...@umich.edu on 20 Aug 2014 at 7:39

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by lhori...@gmail.com on 21 Aug 2014 at 6:31

GoogleCodeExporter commented 9 years ago
This is fixed in master. It will be released as 5.0.4 (eventually).

Original comment by lhori...@gmail.com on 27 Aug 2014 at 5:45