I use the following code to update an object from servlet in Google
App Engine :

    String Time_Stamp="[ 2010-05-26 ]",query="select from
"+Contact_Info_Entry.class.getName()+" where Contact_Id ==
'"+Contact_Id+"' order by Contact_Id desc";

    PersistenceManager pm=null;
    try
    {
      pm=PMF.get().getPersistenceManager();

      // note that this returns a list, there could be multiple,
DataStore does not ensure uniqueness for non-primary key fields
      List<Contact_Info_Entry>
results=(List<Contact_Info_Entry>)pm.newQuery(query).execute();
      Contact_Info_Entry A_Contact_Entry=results.get(0);
      A_Contact_Entry.Extra_10=Time_Stamp;
      pm.makePersistent(A_Contact_Entry);
     }
    catch (Exception e)
{ Send_Email(Email_From,Email_To,"Check_License_Servlet Error
[ "+Time_Stamp+" ]",new Text(e.toString()
+"\n"+Get_Stack_Trace(e)),null); }
    finally { pm.close(); }

The value "[ 2010-05-26 ]" was in A_Contact_Entry.Extra_10, but it
seems "pm.makePersistent(A_Contact_Entry);" was not executed.
The object was not updated and there was no error message, why ? How
to fix it ?

-- 
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