Hi ogterran,

You'll need to define a custom handle_entity function for your loader class.
This function can return multiple ProductIndex entities in addition to the
Product entity being loaded. See the docstring for details:
http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/bulkloader.py#3243

-Nick Johnson

On Wed, Jun 24, 2009 at 10:09 AM, ogterran <jonathanh...@gmail.com> wrote:

>
> Thanks for all the responses.
> I'll use Ian's first suggestion on Product, ProductIndex until
> key_only query issue is resolved.
>
> How do I change my bulkloader to update the Product and ProductIndex
> on one upload?
>
> class ProductLoader(bulkloader.Loader):
>    def __init__(self):
>        bulkloader.Loader.__init__(self, 'Product',
>                                   [('pid', str),
>                                    ('title', lambda x: unicode(x,
> 'utf-8')),
>                                    ('site', str),
>                                    ('url', str)
>                                   ])
>
> Thanks
> Jon
> >
>


-- 
Nick Johnson, App Engine Developer Programs Engineer
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 google-appengine@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to