nosql - Google App Engine - use key_name or ReferenceProperty for quick lookup -


i have user account model , profile model each user. setting key_name of both unique generated id. id stored in session object , way can lookup either user account or profile model using same id key_name. best option or should use referenceproperty instead connect account , profile?

class useraccount(db.model):     datecreated = db.datetimeproperty(auto_now_add=true)     userid = db.stringproperty()     password = db.stringproperty()     emaillower = db.stringproperty()  class profile(db.model):     datecreated = db.datetimeproperty(auto_now_add=true)     firstname = db.stringproperty()     firstnameupper = db.stringproperty()     lastname = db.stringproperty()     lastnameupper = db.stringproperty()     topictags = db.stringlistproperty()     = db.stringproperty(multiline=true)     experience = db.stringlistproperty()   account = useraccount(key_name=uniqueid) profile = profile(key_name=uniqueid) 

later can either id. imagine limits me 1 profile per user account should fine. there benefit me using referenceproperty in 1 or both of useraccount , profile objects?

provided can compute uniqueid, mechanism should fine. there isn't benefit using referenceproperty.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -