I am using GAE (Java) with JDO to save.
I have an object with an Enum field that is marked as @Persistent and is correctly stored in the data store (as seen from the data store viewer in the development console). But when I request these entities that place the filter based on the Enum value, it always returns me all entities regardless of the value that I specify for the enum field.
I know that GAE java supports enumerations that are preserved in the same way as basic data types. But also allows you to receive or request them? A Google search could not point me to such an example code.
Details:
I printed the request just before it was executed. Thus, in two cases, the query looks like this:
SELECT FROM com.xxx.yyy.User WHERE role == super ORDER BY key desc RANGE 0,50 SELECT FROM com.xxx.yyy.User WHERE role == admin ORDER BY key desc RANGE 0,50
Both of the above queries return all User objects from the data store to me, despite the data store viewer showing that some users are of type βadminβ and some of them are of type βsuperβ.
java enums google-app-engine google-cloud-datastore
Gopi
source share