Create a new entity with a long id and then store a key to it in your
user Entity.

Cheers,
Viðar

On Thu, Apr 8, 2010 at 9:16 PM, mscwd01 <mscw...@gmail.com> wrote:
> I have objects which represent users, the key to each object is their
> email address encoded as a String. Having the email address as the key
> works well so i'd like to keep it that way rather than having an auto
> incrementing Long key.
>
> However, for reasons I wont go into here, I need a way of identifying
> user objects via a meaningless number rather than an personal email
> address.
>
> I assumed the datastore may hold a unique auto incrementing number for
> each object regardless of the key type used and if so I was wondering
> how one may access it?
>
> Thanks
>
> On Apr 8, 5:59 pm, "Ikai L (Google)" <ika...@google.com> wrote:
>> You could probably change the characters to integer values and concatenate
>> these, but you are going to get some BIG numbers.
>>
>> Better solution still is probably to use KeyFactory to generate a unique
>> Key. What is it you are trying to do?
>>
>>
>>
>>
>>
>> On Thu, Apr 8, 2010 at 2:19 AM, mscwd01 <mscw...@gmail.com> wrote:
>> > Hey,
>>
>> > As the title of this post suggests, is it possible to get a unique
>> > Long id from a user defined String key?
>>
>> > Thanks
>>
>> > --
>> > 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-j...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2B
>> >  unsubscr...@googlegroups.com>
>> > .
>> > For more options, visit this group at
>> >http://groups.google.com/group/google-appengine-java?hl=en.
>>
>> --
>> Ikai Lan
>> Developer Programs Engineer, Google App 
>> Enginehttp://googleappengine.blogspot.com|http://twitter.com/app_engine
>
> --
> 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-j...@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.
>
>

-- 
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-j...@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