Re: [appengine-java] Can't fetch a dataset using primary key

2011-01-24 Thread Marc Herber
Thanks for your help. Unfortunatelly this syntax isn't working at all :( I tried to run this statement within the datastore viewer but I get an error "GQL Query". Apart from that the link you posted is for python, but I would need it for java. Can you/anybody help me with that too? Thanks in ad

Re: [appengine-java] Can't fetch a dataset using primary key

2011-01-24 Thread Marc Herber
Meanwhile I tried this *java* code: PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory( "transactions-optional" ); PersistenceManager pm = pmf.getPersistenceManager(); Antwort objectById = pm.getObjectById( Antwort.class, parameters.getLong( Constants.ID ) ); And this is my *

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Marc Herber
I just talked about GQL because within the Datastore Viewer of my dashboard I can enter a GQL-query. That's why I was assuming that "everybody" has to use GQL...my fault. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Marc Herber
Thanks for your hint. Meanwhile I debugged the code and found the reason of the NullPointerException. The method getObjectById is implemented by the class DatastoreJDOPersistenceManager. Within this method there is *EntityUtils.idToInternalKey(getObjectManager(), cls, key, false);*. This metho