[appengine-java] Re: Any advantages on using the Key type instead of String or Long for PK

2009-12-22 Thread datanucleus
So I am wondering if there is any sort of implications when using the String type as the pk field. It's portable to other datastores ? ;-) -- 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

Re: [appengine-java] Re: Any advantages on using the Key type instead of String or Long for PK

2009-12-22 Thread Michael Chan
Is that mean that using a String type is not a bad thing to do? On 22 Dec 2009, at 14:05, datanucleus wrote: So I am wondering if there is any sort of implications when using the String type as the pk field. It's portable to other datastores ? ;-) -- You received this message because

[appengine-java] Re: Any advantages on using the Key type instead of String or Long for PK

2009-12-22 Thread datanucleus
Is that mean that using a String type is not a bad thing to do? From a pure persistence point of view, using a portable type (Long, String etc) makes total sense, since your classes aren't tied to GAE. Obviously Google may have some hidden functionality in their Key but thats for them to comment

Re: [appengine-java] Re: Any advantages on using the Key type instead of String or Long for PK

2009-12-22 Thread Michael Chan
Thanks a lot! On 22 Dec 2009, at 14:16, datanucleus wrote: Is that mean that using a String type is not a bad thing to do? From a pure persistence point of view, using a portable type (Long, String etc) makes total sense, since your classes aren't tied to GAE. Obviously Google may have

Re: [appengine-java] Re: Any advantages on using the Key type instead of String or Long for PK

2009-12-22 Thread Max Ross (Google)
Please note that you can still query a Key primary key using comparison, you just can't do it the exact way you've written your example: pm.newQuery(select from Person where key = :p).execute(person.getKey()); On Tue, Dec 22, 2009 at 6:30 AM, Michael Chan hsmc...@gmail.com wrote: Thanks a