Thanks Andy.  It's nice to know all the hidden features.  =)

If the datastore doesn't know about subclasses, I'm not sure they're
worth using.  Couldn't I give Question all the properties I might
need, but only provide values to the ones each instance uses?  Is
there any sort of penalty for declaring properties in a model, but not
using them?

It looks like my other options is to build a helper function that gets
a Question instance from a key_name, like one of thses:

instance = None
subclasses = [ShortAnswerQuestion, MultipleChoiceQuestion, ]
while instance is None:
  instance = subclasses.pop().get_by_key_name(key_name)

or add some sort notation of which subclass it is in the key_name and

instance = None
subclass = None

if key_name_fragment == 'sa':
  subclass = ShortAnswerQuestion
elif key_name_fragment == 'mc':
  subclass = MultipleChoiceQuestion

instance = subclass.get_by_key_name(key_name)


So now I need to decide if it's even worth using subclasses, and if
so, how to go about turning a key_name into an instance.  Advice?
--~--~---------~--~----~------------~-------~--~----~
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