I have one variable pool, shared by all clients, that stores all remaining enemies in a game. When a client starts a game, he gets some enemies from pool. When he finishes, enemies that he did not kill are put back into pool. The game also checks to see if all the enemies have been killed (i.e., pool is empty).
What is the best way t...
I'm looking at the documentation for using cursors. Are these forward-only cursors - we can't page backwards?:
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors
Cursor cursor = Cursor.fromWebSafeString(cursorString);
Map<String, Object> extensionMap = new HashMap<String, Object>();
extensionM...
I am uploading data from a csv file with a GeoPt column in it. I have the GeoPt column data in quotes like this: SomeData,"54.321,-123.456",MoreData
My bulkloader.yaml file has an entry like this:
- property: location
external_name: LOCATION
# Type: GeoPt Stats: 1 properties of this type in this kind.
When I do the upl...
I'm building a webservice and would like to use the user's google account credentials.
The service runs on GAE and will have a web client and an Android native client.
This is my first attempt of something like this and I've been reading about OpenID and the Android AccountManager library.
I'm still not sure what are my options in ter...
I am creating an Django app for Google App Engine. I am using django-nonrel but am using Google App Engine models.
I am wanting to also use Django's admin site.
My models.py for airlines app is:
from google.appengine.ext import db
class Airline(db.Model):
name = db.StringProperty(required=True)
description = db.TextProperty()
no...
Hi,
I am getting this error while trying to save something to Datastore.
I have tried to search but not getting anything.
This is the code where i am saving to datastore :
Student temp = null;
PersistenceManager pm = PMF.get().getPersistenceManager();
try {
Student stu = new Student(name);
temp = pm.makePers...
How can I use properties in db.models that are not meant to be handled as datastore properties?
For instance:
class SpotModel(db.Model):
rating = db.RatingProperty(default=3, choices=[1,2,3,4])
@smiley.setter
def smiley(self, value):
return value
In the above I have a property called smiley, but when I test it using nosete...
I want to retrieve a file form a URL like http://www.abc.com/files/file.pdf and store in the blobstore... how do I do this?
Right now it only allows from form posts ...
...
I am using grails 1.3.3 and app-engine plugin 0.8.10;
my test case is:
upload.gsp:
<form action="/test/process" method="post" enctype="multipart/form-data">
<input type="file" name="file"/>
<input type="submit"/>
</form>
TestController has:
def process = {
println request.getFile("file").inputStream.text
}
First time...
Hey,
I'm experimenting a bit with google app engine and the lack of a transaction di framework is missing. I'm implementing it as good as I can, but I'm hitting the same exception again and again:
can't operate on multiple entity groups in a single transaction. found both Element...
I have read the documentation (http://code.google.com/...
I am trying to upload a file in GAE using the Blobstore API. I am getting the following exception when running the GAE server locally (dev mode):
WARNING: /_ah/upload/ag10cmlwc2NoZWR1bGVychsLEhVfX0Jsb2JVcGxvYWRTZXNzaW9uX18YFQw
java.lang.IllegalStateException: Must call one of set*BlobStorage() first.
at com.google.appengine.api.blobsto...
how can i increase the datastore item size limit, which is now only 1 MB, in app engine?
if i buy more storage what will happen to this limit?
thanks
...
If I have the google assigned key of an entity in my datastore, say ag1iYXRjaC1nZW5lcmljchcLEgxCYXRjaGVzTW9kZWwiBUpvYiAyDA, is there a way I can easily fetch the entity by this key? I've tried using .get_by_id(), .filter('__key__=', 'ag1iYXRjaC1nZW5lcmljchcLEgxCYXRjaGVzTW9kZWwiBUpvYiAyDA') and can't seem to find anything that works. Any ...
I'm using GAE/Java with Objectify, and I'm trying to find the fastest way to check if a given object exists in the datastore, given the key. What I'm doing right now is .get(key) with @Cached on, but either way that still retrieves the entire object, which is unnecessary.
Any ideas on how to do this with an index only hit? I was also th...
I've got a small function that reads a zip file from an input stream and then stores the contents in an arraylist. I'm using GAE which is limited to files less than 1mb. I've converted the InputStream into a BlobstoreInputStream so I can now upload zip files that are > 1mb. However I can still only access < 1Mb of data from it or I get ...
Hi all. Learning GAE I`ve got some issue. I want to save contact list of my users in database. I use addUser() to add new user and it works. But when I refresh the page the list is empty (not null). In GAE "Datastore Viewer" the "list" field is null but in application it exists.
@PersistenceCapable(identityType = IdentityType.APPLICATIO...
My understanding is that with GAE JPA support I cannot:
@ManyToMany
private Set<SSUser> contacts;
protected SSUser(){}
public SSUser(final String userId, final String emailId){
this.userId = userId;
this.emailId = emailId;
contacts = new HashSet<SSUser>();
}
I'm trying to establish a contacts...
I'm creating a new entity like:
some_model = ModelName(
attr1 = ...,
attr2 = ...,
attr3 = ...,
attr4 = ...
).put()
Is there anyway to get the key of this newly created entity? I tried doing some_model.key() put that does not work.
...
How does the performance of db.get() compare with that of db.get_by_key_name()?
...
bulkoader.yaml:
transformers:
- kind: ExampleModel
connector: csv
property_map:
- property: __key__
external_name: key
export_transform: transform.key_id_or_name_as_string
- property: data
external_name: data
- property: type
external_name: type
...