Is there an official way to get the Model class from a Query instance? I
had a look through the online docs and couldn't find anything.
In the SDK code however, the Model class of a Query instance can be
retrieved from the _model_class attribute of the Query instance, eg:
q = MyModel.all()
Hi Nick,
I have something like this:
class Foo(db.Model):
name = db.StringProperty()
...
class Bar(db.Model):
foo = db.ReferenceProperty(Foo, collection_name='bars')
foo_name = db.StringProperty()
class Baz(db.Model):
foo = db.ReferenceProperty(Foo, collection_name='bazs')
Hi Nickolas,
On Fri, Feb 19, 2010 at 2:14 PM, Nickolas Daskalou n...@daskalou.comwrote:
Hi Nick,
I have something like this:
class Foo(db.Model):
name = db.StringProperty()
...
class Bar(db.Model):
foo = db.ReferenceProperty(Foo, collection_name='bars')
foo_name =
Thanks for your advice Nick.
My actual app is a bit more complex than the example I gave. I'll explain
more in my response to your comments below.
Will this be an all-or-nothing proposition? Eg, if the put of 'foo' changed
the foo_name, they'll all need updating, otherwise none of them will? In