Does anyone have an answer for this? Google guys?
2010/1/15 Kapil Kaisare <kksm19820...@gmail.com> > As an aside: what is an EntityProto, and is there a link in the GAE > documentation for it? > > Regards, > Kaisare, Kapil Sadashiv > > > > On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou <n...@daskalou.com>wrote: > >> How can I convert an EntityProto to a Model instance? >> >> I have a Model method, pre_put(), that I want to call on each Model >> instance before it's Put into the Datastore, using hooks (eg: >> http://code.google.com/appengine/articles/hooks.html). >> >> My hook code looks like this: >> >> def hook(service, call, request, response): >> assert service == 'datastore_v3' >> if call == 'Put': >> for entity in request.entity_list(): >> entity.pre_put() >> >> When the hook is called and runs, I get this error: >> >> AttributeError: EntityProto instance has no attribute 'pre_put' >> >> Is there any way to convert the entities in request.entity_list() to their >> original Models, manipulate them, and then convert them back to an >> EntityProto instance? Or even better, if the EntityProto instances have >> references to the actual Model instances which we can access and manipulate? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine" group. >> To post to this group, send email to google-appeng...@googlegroups.com. >> To unsubscribe from this group, send email to >> google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-appengine?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to google-appeng...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > >--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.