Hi Rob,
The string encoded key includes the appid, that's why your seeing the keys change. A key name or id will be unique within a namespace and kind, so if you can convert your format it should fix your problem. You will have a problem if you have any overlapping names and ids. If you use namespaces you'll also need to account for that.
Robert
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 <robert...@gmail.com> wrote:
> Hi Robert,
>
> Thanks, I've now converted the format, just testing everything now.
> Another quick question, are auto-generated Id's unique across entity
> groups? So if I set a parent entity on some of models, could they
> potentially have overlapping ids with other models (of the same kind,
> in the same namespace) that don't share the same parent?
>
> Thanks
> Rob
>
> On Jul 4, 5:51 am, Robert Kluin <robert.kl...@gmail.com> wrote:
>> Hi Rob,
>> The string encoded key includes the appid, that's why your
seeing the keys
>> change. A key name or id will be unique within a namespace
and kind, so if
>> you can convert your format it should fix your problem. You
will have a
>> problem if you have any overlapping names and ids. If you use
namespaces
>> you'll also need to account for that.
>>
>> Robert
>> On Jul 2, 2011 6:37 AM, "Bert"
<robertbcur...@gmail.com> wrote:
>
> --
> You received this message because you are subscribed to the
Google Groups "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
google-appengi...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.
>
>
--
------
Robert Kluin
Ezox Systems, LLC
From what I've noticed, the auto-generated IDs are only unique across entity groups in the SDK.In production, each entity group has it's own set of IDs.
--To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/O6HAhJr4UBsJ.
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.