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?
...
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...
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!
...
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...
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.
...
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...
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...
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.
...
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...
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...
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...
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.
...
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 ...
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...
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...
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
...
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?
...
Is google app engine datastore support unique constraints?
Thanks in advance
...
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...
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...