Hi Graham,
I covered specifying key names briefly in this article:
http://blog.notdot.net/2009/9/Advanced-Bulk-Loading-part-2-Customization

It doesn't explicitly demonstrate returning key objects from generate_key,
but it's a fairly straightforward modification of that.

-Nick Johnson

On Tue, Oct 6, 2009 at 12:24 AM, Graham Charles <[email protected]>wrote:

>
> Thanks for the reply! Any idea where I can find any documentation or
> sample code?
>
> Thanks,
>
> g.
>
> On Oct 5, 2:39 am, "Nick Johnson (Google)" <[email protected]>
> wrote:
> > Hi Graham,
> >
> > On Sun, Oct 4, 2009 at 10:25 PM, Graham Charles <
> [email protected]>wrote:
> >
> >
> >
> > > I'm struggling with bulk uploading CSV files to related tables. I have
> > > foreign keys in the source data, but obviously, GAE doesn't use them.
> >
> > You can translate foreign keys into db.Key instances, and use a
> > ReferenceProperty in you model for them.
> >
> > > The code at
> >
> > >http://code.google.com/appengine/docs/python/tools/uploadingdata.html
> >
> > > Works great for one flat table at a time, but doesn't reference how to
> > > relate entries in a Child table to its Parent.
> >
> > Override the generate_key method in your Loader class, and have it return
> a
> > key specifying the desired Parent.
> >
> > -Nick Johnson
> >
> >
> >
> > > Thanks,
> >
> > > Graham Charles
> >
> > --
> > Nick Johnson, Developer Programs Engineer, App Engine
> > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
> Number:
> > 368047
> >
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
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 [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