Has anyone tried to dynamically select which properties they want to
write to an entity on appengine? For example:

I have a web form with 5 fields, and any given user will fill out some
subset of those fields. I POST only the fields with data to the server
(e.g. Fields 1,2,4). On the server side, how do I elegantly write only
properties 1,2, and 4? The Model class has a function that returns a
dictionary of property names (Model.properties()), but how would I use
it to select property names?

In SQL, I would build an INSERT or UPDATE statement by matching the
fields POSTed against the Model.properties() dictionary. I read trunk/
google/appengine/ext/db/init.py which seemed to confirm that there is
no way to refer to the properties as a group. Am I approaching this
the wrong way? Anyone know of a workaround?


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

Reply via email to