Nick,

> Pretty much, except kind() is a method for Model classes, not loaders. Like
> this:
>
> class Foo(db.Model):
>   @classmethod
>   def kind(self):
>     return 'my.Foo'
>
>

The above kind() method makes more sense (in the model instead of the
loader). Was not aware of it as the docs don't give much of a hint (
http://code.google.com/appengine/docs/python/datastore/modelclass.html#Model_kind)
as to other uses. Thanks for pointing it out.

As above, and specify the kind you declared in the Python module on the
> command line and in the loader.
>
>
Just to clarify, my loader will look like this:

================================
class Foo(db.Model):
  name = db.StringProperty()
  data = db.IntegerProperty()

  @classname
  def kind(self, entity):
    return 'my.Foo'

class FooLoader(bulkloader.Loader):
 def __init__(self):
  bulkloader.Loader.__init__(self, 'my.Foo',
                [('name', str),
                ('data', int)
                ])
================================

and my command line will have --kind=my.Foo

Correct?


>
>
>> And if that's not enough <grin> it would be good to see the query syntax
>> in the runtime application (e.g. "SELECT * from package.MyName" with the
>> right python import statements).
>>
>
> If you're using GQL, you need to use the kind name, not the class name (so
> in this example it would be "SELECT * FROM my.Foo").
>

Yes, GQL is how I will access, so I will use the full Kind name. It also
seems that in Java if I use:

          Query q = new Query(Foo.class)

that the resulting query will be generate a statement with "SELECT * FROM
my.Foo"

I will give this a shot (later tonight) and post my results to the list.

Unfortunately, I pushed all of my data without the kind() method in the
model exposing the full name of my corresponding Java class. I don't think
there is any way fix the data in the store, except to delete it all and
start again with the updated model and bulk loader. Correct?

Stuart

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to