Downloading Primary Keys with appcfg.py

3 views
Skip to first unread message

Benjamin

unread,
Apr 9, 2010, 1:46:07 PM4/9/10
to Google App Engine
I'm downloading data from my production data store into a CSV using
appcfg.py and the remote_API everything works great but i can't seem
to download the identity column. All of my persisteny properties come
down just fine. The property marked with :

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
public Long id;

isn't accessible. I'm assuming i just don't know how to create the
model correctly since i'm new to python. I'm getting a
MissingPropertyError: ID message

I'm thinking it's somthing simple regarding how i'm setting the id
= .. in both my exporter and model
Here is my model:

class NimbitsUser(db.Model):
id = db.IntegerProperty() <---- wrong eh?
email = db.StringProperty()
user = db.StringProperty()
userkey = db.StringProperty()
dateCreated = db.DateProperty()

and my exporter:

class UserExporter(bulkloader.Exporter):
def __init__(self):
bulkloader.Exporter.__init__(self, 'NimbitsUser',
[('email', str, None),
('user', str, None),
('userkey', str, None),
('dateCreated', str, None),
('id', int, None)
])

exporters = [UserExporter]

Benjamin

unread,
Apr 9, 2010, 2:05:31 PM4/9/10
to Google App Engine
i did find this posting
http://groups.google.com/group/google-appengine-java/browse_thread/thread/4282ec1ecf8b9171/da12ef2ba4f2f172?lnk=gst&q=bulkloader+dump+and+restore#da12ef2ba4f2f172

but i still get the error above. I'm wondering if the solution above
only works for the key type and not Long keys.

Reply all
Reply to author
Forward
0 new messages