gae-datastore

google datastore - does it do lazy loading?

if I have a Customer object with a list of orders, declared using the db.ReferenceProperty after a while I may have huge amount of orders in there, if I pull the Customer object would I be in danger of pulling the complete set of orders? ...

What causes this retainAll exception?

java.lang.UnsupportedOperationException: This operation is not supported on Query Results at org.datanucleus.store.query.AbstractQueryResult.contains(AbstractQueryResult.java:250) at java.util.AbstractCollection.retainAll(AbstractCollection.java:369) at namespace.MyServlet.doGet(MyServlet.java:101) I'm attempting to take on...

How to implement paging in both directions in GAE-J with cursors

Hello all, I'm trying to implement paging in my GAE-J/GWT app. Paging forward with a cursor is straight-forward, but I'm wondering if there's some best-practice for paging both forward and backward with cursors. Thanks! ...

How the existing data to be if entity structure modified or deleted on GAE?

GAE recommends using JDO/JPA. But I have serious question about using OODB like them. JDO based on user's class structure. And data structure should be modified continually as service advances. So, If data(entity) class property being removed, what happened to existing data on the property? If data(entity) class renamed for refactoring...

Google App Engine - What exception does Transaction.commit() throw when there is a concurrency problem?

What exception does com.google.appengine.api.datastore.Transaction.commit() throw when there is a concurrency problem? I want to retry if there is a concurrency issue, but I don't know what exception to catch. ...

unable to set fields of a collection-property elements after changing their order (elements becoming 'deleted')

Hello I want to change order of objects in a collection, and then to access+modify fields of those items. Unfortunately the items somehow become 'deleted'. This is what I do... if(someCondition) { MainEvent mainEvent = pm.getObjectById(MainEvent.class, mainEventKey); /* * events in the original order * MainEvent.subEvents f...

How to change order in ordered+persisted collection?

I just need to change order of items in a (previously persisted) ordered collection... I tried simply passing the re-arranged collection to a setter: after committing a transaction the collection is gone. Then I tried to clear() the existing collection and addAll() afterwards: clear() makes persistent manager to mark all the elements as...

How can I Export local datastore data to Production Google App Engine Datastore

Hi I wanted to export my local datastore data to my google appengine application datastore. Is there any direct and short way to do it. ...

Searching through Model relationships in Google App Engine?

I have 2 models: class Parent (db.Model) : data = db.StringProperty() class Child1 (db.Model) : parent = db.ReferenceProperty(Parent) childData = db.StringProperty() class Child2 (db.Model) : parent = db.ReferenceProperty(Parent) childData2 = db.StringProperty() class Child3 (db.Model) : parent = db.ReferenceProperty(Par...

Google Datastore low-level api query by key property

I'm using the low-level google datastore api and I want to query by the key property and another property (let's call it category). I need to query based on a list of keys for which I'll use the IN operator. I know that the max. number of values you can provide for the IN clause is 30. I have 2 questions: Does the limit of 30 IN val...

What is Google Docs' SLA?

Hi all, I am evaluating online storage and for me, that means either Amazon S3 or Google Docs. Amazon very clearly posts there reliability and SLA: http://aws.amazon.com/s3/#protecting Their rates are obviously higher than Google's, but it is really hard to compare without having an SLA. Does anyone know what Google's commitment is f...

how do I instrospect appengine's datastore models?

in order to dynamically create a form, i have to find the property types of a model's properties at runtime. appengine docs says that Model.properties() will return a dictionary of properties name and their class type. when i use this method in my code, only the name is returned and the classtype value is always empty. ...

App Engine - Save response from an API in the data store as file (blob)

Hi there, I'm banging my head against the wall with this one: What I want to do is store a file that is returned from an API in the data store as a blob. Here is the code that I use on my local machine (which of course works due to an existing file system): client.convertHtml(html, open('html.pdf', 'wb')) Since I cannot write to a ...

How to retrieve Google Appengine Objects by id (Long value) ?

Hi, i have declared an entity the following way: public class MyEntity { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private String text; //getters and setters } Now I want to retrieve the objects using the id. I tried to manage it from the Google Appengine Data Vie...

GAE Datastore: persisting referenced objects

I am trying to persist Java objects to the GAE datastore. I am not sure as to how to persist object having ("non-trivial") referenced object. That is, assume I have the following. public class Father { String name; int age; Vector<Child> offsprings; //this is what I call "non-trivial" reference //ctor, getters, setters...

Google Datastore - Blob or Text

2 possible ways of persisting large strings in the Google Datastore are Text and Blob properties. From a storage consumption perspective which of the 2 is recommended? Same question from a protobuf serialization and deserialization perspective. Thanks, Keyur ...

jpa-Google app engine

I had created entity in google app engie datastore using JPA. I set the id as follows @Id @GeneratedValue(strategy=GenerationType.SEQUENCE) private Long s; After i deployed my applicaiton it give identity (i.e) unique value.but igive 1001,1002,1003 ....as id.But i wnat 1,2,3,4,5 like that.how to achive this? ...

unique constraints-Google app engine

Is google app engine datastore support unique constraints? Thanks in advance ...

Change|Assign parent for the Model instance on Google App Engine Datastore

Is it possible to change or assign new parent to the Model instance that already in datastore? For example I need something like this task = db.get(db.Key(task_key)) project = db.get(db.Key(project_key)) task.parent = project task.put() but it doesn't works this way because task.parent is built-in method. I was thinking about creating...

Can't wrap my head around appengine data store persistence

Hi, I've run into the "can't operate on multiple entity groups in a single transaction." problem when using APPENGINE FOR JAVA w/ JDO with the following code: PersistenceManager pm = PMF.get().getPersistenceManager(); Query q = pm.newQuery("SELECT this FROM " + TypeA.class.getName() + " WHERE userId == userIdParam "); q.declarePa...