Hi, put() will raise an exception if the operation does not succeed. It will not return successfully if the entity was not stored. It's difficult to say what the cause of your problem could be without seeing your source.
Note, however, that HTTP GET requests are not supposed to modify data. They're frequently cached by proxies and browsers, and much software assumes it can safely replay the GET request without doing any harm. You should use a POST request (or another method, such as PUT) if you're modifying data. This also avoids any caching issues. -Nick Johnson On Mon, Feb 22, 2010 at 7:36 AM, Flips <[email protected]> wrote: > Hi, > > I have some sort of API that allows a client to change the properties > of an entity via HTTP GET request. A typical request looks like this - > > > > > http://mylittleapp.appspot.com/api/setItemInfo/?key=super_secret_key&id=entity_id&title=new_title > > The Entity's title property is usually null and gets set by the HTTP > GET request. I fetch the entity, change the title property and use > model.put() to save it. > > Sometimes this does not happen (title remains null) but there is no > exception and the client gets a 200 response. But if I retry the > specific GET request the title property will be saved. > > Does model.put() ever raise any exceptions or do I need to use > db.put(model)? > > Best Regards > Philip > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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?hl=en.
