1. I'm getting it from a http request parameter - the id is obtained
this way:
out.print("<a href=\"editQuestion.jsp?surveyID=" + survey.getIdSurvey
() + "&questionID=" + q.getIdQuestion().getId() + "\">Edit</a>");
I cannot send the whole Key via the request...

2. this worx!! thank you very much Rayala :) the code is now:

public Question getQuestionByID(String surveyID, String questionID) {
        PersistenceManager pm = PMFactory.get().getPersistenceManager
();
        Question q = (Question) pm.getObjectById(Question.class,
questionID);
        pm.retrieve(q);
        pm.close();
        return q;
}

On Aug 18, 4:54 am, Rayala Udayakumar <[email protected]> wrote:
> I have few basic questions here:
> 1. How are you getting the Question Id as string when the id is defined as
> Key ? If you are using KeyFactory.keyToString(), the stringToKey() should be
> able to give you the Key back right ?
>
> 2. If you have had your question id as encoded string key, you can then
> directly use the string key and retrieve the object without the parent id.
> Is that correct ?
>
> Please help me clarify.
>
> Thanks,
> Uday.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to