Hello,

I have the following

Class Party {
@Long id;
Key<Tenant> tenantKey;
String firstname;
}

Party p = new Party();
Key<Tenant> tenantKey = new Key<Tenant>(Tenant.class, "mmc");
p.setTenantKey(tenantKey);
// create a Party in empty namespace
Key<Party> partyKey = ofy.put(p);

Now, I do the following, just for illustration and to clearly understand
with namespaces.
p = ofy.get(partyKey);
tenantKey = p.getTenantKey();
NamespaceManager.set(tenantKey.getName());
ofy.put(p)
// delete the Party in the empty namespace
NamespaceManager.set("");
ofy.delete(p);

Actually, I did the above logic in a mapper for few thousand Parties,
transferring the party entities into its own Namespace.

Now, I start creating Parties in the "mmc" namespace, I frequently get the
following error

*com.google.appengine.api.datastore.DatastoreFailureException: the id
allocated for a new entity was already in use, please try again*

Regards,
-Aswath

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to