Hi, I don't know the exact answer to your question but what I can say is that it is clearly dependent on your entity group hierarchy.
The key contains a concatenation of the key of all the ancestors. I never saw any limitation on the depth of this ancestor hierarchy. So, if you can be as deep as you want on ancestors, that means that the length of key is not limited. But, I guess we need confirmation from googlers on this one regards didier On Jan 17, 7:23 am, Charms Styler <[email protected]> wrote: > hmmm thnx. it certainly did the trick.but I couldn't find the maximum > length of a key? any ideas ? > > On Fri, Jan 14, 2011 at 6:42 PM, Didier Durand <[email protected]> > wrote: > > Hi, > > > You may be interested to read to undertstand the structure of DS keys: > >http://code.google.com/appengine/articles/storage_breakdown.html#anc-... > > > And, to answer your question, you can use key.getId() (see > >http://code.google.com/appengine/docs/java/javadoc/com/google/appengi...) > > on low-level api to retrieve the Long that you need for JPA > > > regards > > > didier > > > On Jan 14, 1:59 pm, Charms Styler <[email protected]> wrote: > >> Thanks. So it is possible to use both JPA & low level API. > > >> I tried it out , works like a charm but @ retrieval of specific object I > >> ran > >> into prob you see > >> in my JPA, all my Entities are by long ID. How is possible for me to access > >> id using Key ? How may I refer keys using id & vice versa?? > > >> @Id > >> @GeneratedValue(strategy = GenerationType.IDENTITY) > >> private Long id; > > > -- > > 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 [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://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 [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-java?hl=en.
