Reputation: 2398
Calling Objectify method:
Key.create(ParentClass.class parentClass, KindClass.class kindClass, String id)
for the exactly same parameters twice at the same time, I got:
name=UWxoCs7KpxDu2fYBI3s2fkOq-wM
name=jOqQzhZzAScJ0O3OEtYF3jzb34Q
Does this method need to run in a transaction so I get a predictable result?
Upvotes: 0
Views: 672
Reputation: 13556
The app id and namespace are also encoded in the key. You can see the components that represent a stable key here:
Upvotes: 1
Reputation: 574
I cannot find any reference to an Objectify Key.createKey
method. Which version of Objectify are you using?
There is however a Key.create(Key<?> parent, java.lang.Class<? extends T> kindClass, java.lang.String name)
, trying using that and let us know how you get on.
Here is the API page for Key
https://objectify-appengine.googlecode.com/svn/trunk/javadoc/com/googlecode/objectify/Key.html
Upvotes: 0