[google-appengine] Re: Problem when storing a integer into a model(GQL)

2009-03-15 Thread Tim Hoffman
Here's some things to look at. versionumber must be 0 when you fetch it, are you sure there is only one instance of ManifestVersion, and if there is supposed to be only one, why the call to ManifestVersion.all(), you should just get the object by id or key. (Have you confirmed that there is only

[google-appengine] Re: Problem when storing a integer into a model(GQL)

2009-03-15 Thread Marcelo Sena
I found something interesting. If i don't try to commit the versionNumber, its value is set to 1. Could it be something wrong with in my model? On Mar 15, 8:03 am, Tim Hoffman zutes...@gmail.com wrote: Here's some things to look at. versionumber must be 0 when you fetch it, are you sure there

[google-appengine] Re: Problem when storing a integer into a model(GQL)

2009-03-15 Thread Marcelo Sena
There is only one instance of ManifestVersion. I used versionList.count () and it returned 1. And I'm not really looking into ensuring the uniqueness in ManifestVersion. Latter that model will disappear and become just a variable in the user entity(which I haven't created yet), but thanks for the

[google-appengine] Re: Problem when storing a integer into a model(GQL)

2009-03-15 Thread djidjadji
ManifestVersion.all() returns a Query object. You must get or fetch them before you can use the objects def incrementVersion(): versionList = ManifestVersion.all().get() versionList.versionNumber += 1 versionList.put() return versionList.versionNumber Execute this type of functions