As I recall the auto generated ids are unique for the kind; however, I
would not assume that is the case since it is an implementation
detail.

I encountered a similar issue when migrating to HR. My solution was to
write a custom key encoder / decoder that includes everything except
the appid. I basically use db.Key.to_path to get a list of the parts,
then concat and base 64 encode them. I then also use db.Key.from_path
to rebuild the keys when needed.

Robert

On Monday, July 4, 2011, Bert <[email protected]> wrote:
&gt; Hi Robert,
&gt;
&gt; Thanks, I've now converted the format, just testing everything now.
&gt; Another quick question, are auto-generated Id's unique across entity
&gt; groups? So if I set a parent entity on some of models, could they
&gt; potentially have overlapping ids with other models (of the same kind,
&gt; in the same namespace) that don't share the same parent?
&gt;
&gt; Thanks
&gt; Rob
&gt;
&gt; On Jul 4, 5:51 am, Robert Kluin &lt;[email protected]&gt; wrote:
&gt;&gt; Hi Rob,
&gt;&gt;   The string encoded key includes the appid, that's why your
seeing the keys
&gt;&gt; change.  A key name or id will be unique within a namespace
and kind, so if
&gt;&gt; you can convert your format it should fix your problem.  You
will have a
&gt;&gt; problem if you have any overlapping names and ids. If you use
namespaces
&gt;&gt; you'll also need to account for that.
&gt;&gt;
&gt;&gt; Robert
&gt;&gt; On Jul 2, 2011 6:37 AM, &quot;Bert&quot;
&lt;[email protected]&gt; wrote:
&gt;
&gt; --
&gt; You received this message because you are subscribed to the
Google Groups &quot;Google App Engine&quot; group.
&gt; To post to this group, send email to [email protected].
&gt; To unsubscribe from this group, send email to
[email protected].
&gt; For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.
&gt;
&gt;

-- 
------
Robert Kluin
Ezox Systems, LLC

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

Reply via email to