gae-datastore

How to get the number of rows in a table in a Datastore?

Hi, In many cases, it could be useful to know the number of rows in a table (a kind) in a datastore using Google Application Engine. There is not clear and fast solution . At least I have not found one.. Have you? ...

Google appengine datastore alternative?

I'm using Google AppEngine with build-in datastore. But, I want move all datastore to my new VPS. I'll use Apache Cassandra. How to move from GAE Datastore to Apache Cassandra? ...

Why is only the suffix of work_index hashed?

I'm reading through the PDF that Brett Slatkin has published for Google I/O 2010: "Data pipelines with Google App Engine": http://tinyurl.com/3523mej In the video (the Fan-in part) Brett says that the work_index has to be a hash, so that 'you distribute the load across the BigTable': http://www.youtube.com/watch?v=zSDC_TU7rtc#t=48m44 .....

Google datastore stats

I am querying the __Stat_Kind__ kind. It does not return me entities about kinds that currently exist in the datastore but it includes entities about kinds that I had deleted more than a week ago. I am not so much concerned about it returning me the non-existent kinds - the doc does mention this scenario after all. But I am concerned t...

Google App Engine - DELETE JPQL Query and Cascading

I noticed that the children of PersistentUser are not deleted when using the JPQL query below. However, the children are deleted if I perform an entityManager.remove(object). Is this expected? Why doesn't the JPQL query below also perform a cascaded delete? @OneToMany(mappedBy = "persistentUser", cascade = CascadeType.ALL) private Colle...

Datastore performance, my code or the datastore latency

I had for the last month a bit of a problem with a quite basic datastore query. It involves 2 db.Models with one referring to the other with a db.ReferenceProperty. The problem is that according to the admin logs the request takes about 2-4 seconds to complete. I strip it down to a bare form and a list to display the results. The put w...

Fetching a random record from the Google App Engine Datastore?

I have a datastore with around 1,000,000 entities in a model. I want to fetch 10 random entities from this. I am not sure how to do this? can someone help? ...

Difference between Kind and Entity in GAE datastore?

What is the difference between Kind and Entity in Google App Engine datastore? ...

Appengine Datastore Record Cannot be deleted or changed

This one is probably an appengine fluke and a bug, but I'd love to hear if anyone has any suggestions. I discovered that a single datastore record is behaving strangely by showing up at the beginning of a query on a datetime field sorted by oldest to newest, although the date was newer than all of the other records. On closer inspection...

Efficient way to store tuples in the datastore

If I have a pair of floats, is it any more efficient (computationally or storage-wise) to store them as a GeoPtProperty than it would be pickle the tuple and store it as a BlobProperty? If GeoPt is doing something more clever to keep multiple values in a single property, can it be leveraged for arbitrary data? Can I store the tuple ("Jo...

How to instert child entities in JDO (Google App Engine) ?

How do i add a record to a child entity in the example below ? For example i have a Employee Record which is name is "Sam". how do i add 2 street adress for sam ? Guess i have a The Parent entity is Employee import java.util.List; // ... @Persistent(mappedBy = "employee") private List<ContactInfo> contactInfoSets; The Child key is ...

how to store password on gae when someone register.

ex: username:zjm1126 password:11 i stored the password to the datastore on gae, when i see the data view at /_ah/admin, i can see the password all people's password who register, i think it is not safe , yes ? is password stroed like this ? how to stored password, thanks and the check_password method is : user=MyUser.get_by...

Google App Engine - update_indexes error

I have a Java app deployed on app engine and I use appcfg.py of the Python SDK to vacuum and update my indexes. Yesterday I first ran vacuum_indexes and that completed successfully - i.e. it en-queued tasks to delete my existing indexes. The next step was probably a mistake on my part - I then ran update_indexes even though my previous...

Appengine backreferences - need composite index?

I have a query that is very recently starting to throw: "The built-in indices are not efficient enough for this query and your data. Please add a composite index for this query." I checked the line on which this exception is being thrown, and the problem query is this one: count = self.vote_set.filter("direction =", 1).count() This...

How do sites like stackoverrflow using the third party login id, to login to the site?

How the sites like stackoverrflow using the third parthy login id(gmail,blogspot), to login the site? How to do this in asp.net? Give me a idea to implement this in to my application. i don't have idea from where. I have to start this. ...

database modeling for google app engine for multiple revison of entity.

hi, in my application ( kind of wiki clone ) - an article is frequently changing. and i need to track all changes that are done on that article. { text only. } one crude way i have done it, is to add a datetime property and create a new entity everytime something change. which is too much database wasting. { and also un-necessary inde...

Appengine datastore phantom entity - inconsistent state?

Getting a weird error on java appengine code that used to work fine (nothing has changed but the data in the datastore). I'm trying to iterate over the results of a query and change a few properties of the entities. The query does return a set of results, however, when I try to access the first result in the list, it throws an exceptio...

Datastore Category vs. String: what is the difference?

Looking at Category it seems that it is basically a String. I fail to see any advantages of using Category over String. What is the difference, and why would I use Category instead of String? ...

Fetching just the Key/id from a ReferenceProperty in App Engine

Hi SO, I could use a little help in AppEngine land... Using the [Python] API I create relationships like this example from the docs: class Author(db.Model): name = db.StringProperty() class Story(db.Model): author = db.ReferenceProperty(Author) story = db.get(story_key) author_name = story.author.name As I understand it, t...

Google App Engine database model.

I need a simple application in GAE: I have users: public User { private @Id Long id; private String name; } and messages private Message { private @Id Long id; private Key sender; private Key reciever; private Date sendDate; } The problem is: I need to fetch all messages sended and recieved by given user s...