Q:

JDO for GAE: Update objects returned by a query

There is persistable class Project, each instance of which has list of objects of Version type (owned one-to-many relation between Project and Version classes).
I'm getting several Version objects from datastore with query, change them and try to save:
PersistenceManager pm = PMF.get().getPersistenceManager();
Transaction tx = pm.currentTransaction();
try {
    tx.begin();
    Query q = pm.newQuery(Version.class, "... filters here ...");
    q.declareParameters(" ... parameters here ...");
    List<Version> versions = (List<Version>)q.execute(... parameters here ...);
    if (versions.size() > 0) {
        for (Version version : versions) {
            version.setOrder(... value here ...);
        }
        pm.makePersistentAll(versions);
    }
    tx.commit();
    return newVersion.toVersionInfo();
} finally {
    pm.close();
}

Everything is executed without errors, query actually returns several objects, properties are set correctly in runtime versions list, but objects properties are not updated in datastore.
Generally, as far as I understand, versions should be saved even without calling
pm.makePersistentAll(versions);

, since object properties are set before pm.close(), but nothing is saved, if this row is omitted, as well.
At the same time, if I retrieve instance of type Project (which owns many instances of type Version) with pm.getObjectById() method, and walk through all related Version objects in the loop, all changes are saved correctly (without calling pm.makePersistent() method).
The question is, what's wrong with such way of updating objects? Why Version object properties are not updated in datastore?
I could not find anything helpful neither in JDO nor in GAE documentation.

A:

Thanks for advice about logs from DataNucleus and sympathy from Peter Recore :)
Frankly, I missed few important points in my question.
Actually,between
tx.begin();

and
Query q = pm.newQuery(Version.class, "... filters here ...");

I am retrieving Project instance, and after Version instances updating loop I am persisting some one more Version object.
So, I actually retrieved some of versions list twice, and according to committing order in logs, Project instance was saved twice, as well. The second save operation overwritten the first one.
I changed the order of operations, and got expected behavior.

