On Nov 3, 8:31 am, "David Symonds" <[EMAIL PROTECTED]> wrote:
> Not quite. An entity may look like an instance of a Kind when accessed
> through the db.Model layer, but it isn't fundamentally a specific
> Kind.  For instance, the Key-space is across all entities of your
> datastore, not of a particular kind.

Hold it.  db.Key s are typed by kind - db.get(key) returns None or an
instance of key.kind(), which is a subclass of db.Model.  That kind/
subclass is determined by the db.Model subclass whose instance was
db.put()'d.

> Also, if you change your
> db.Model, existing entities aren't changed automatically.

Since class definitions don't completely define instances in python
anyway, the fact that an entity in the datastore doesn't change when
the corresponding db.Model changes doesn't imply that entities aren't
the datastore representation of db.Model instances.

Yes, the elements resulting from a db.get are datastore contents
dependent, but that's ordinary python; it doesn't imply that the
resulting db.Model instances are not instances.  It just means that
the db.Model subclass code must handle whatever it might get, just as
they must handle element changes made by other code.

--~--~---------~--~----~------------~-------~--~----~
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