Updating entity fields in app engine development server
- by Joey
I recently tried updating a field in one of my entities on the app engine local dev server via the sdk console. It appeared to have updated just fine (a simple float). However, when I followed up with a query on the entity, I received an exception: "Items in the mSomeList list must all be Key instances".
mSomeList is just another list field I have in that entity, not the one I modified. Is there any reason manually changing a field would adversely throw something off such that the server gets confused? Is this a known bug?
I wrote an http handler to alter the field through server code and it works fine if I take that approach.
Update: (adding details)
I am using the python google app engine server. Basically if I go into the Google App Engine Launcher and press the SDK Console button, then go into one of my entities and edit a field that is a float (i.e. change it from 0 to 3.5, for instance), I get the "Items in the mMyList list must all be Key instance" suddenly when I query the entity like this:
query = DataModels.RegionData.gql("WHERE mRegion = :1", region)
entry = query.get()
the RegionData entity is what has the mMyList member. As mentioned previously, if I do not manually change the field but rather do so through server code, i.e.
query = DataModels.RegionData.gql("WHERE mRegion = :1", region)
entry = query.get()
entry.mMyFloat = 3.5
entry.put()
Then it works.