Thanks. My own experiment looked similar (your solution i more general an prettier), but doesn't this approach trigger an extra data fetch for the referred entity each time we fetch instantiate the referrer?
Cheers Tonny On 15 Okt., 08:59, Chris Tan <[email protected]> wrote: > I wrote a KeyNameReferenceProperty awhile back, maybe this will help: > > http://gist.github.com/109193 > > On Oct 12, 12:45 am, Tonny <[email protected]> wrote: > > > > > Hi > > > Can someone help with this consideration: > > > When we're creating a ReferenceProperty on datastore objects the value > > stored in the model is the key > > for the referenced object (stating the obvious here, but please stay > > with me), but when the reference object > > has a key_name, which makes up a pretty name (understandable from the > > datastore viewer), it would be nice to use that key name instead. Is > > there an easy way to use that key_name instead? > > > I could imaging subclassing ReferenceProperty, but looking at the API, > > I can't seem to find someplace to hook > > in. I could write my own ReferenceProperty from scratch, subclassing > > Property, but I would also like a simple > > solution where I didn't reinvent all ready existing functionality. > > > Regards > > Tonny --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
