Sorry I meant, @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true") private Key mPrimaryKey;
Make sure the Key class is from com.google.appengine.api.datastore.Key; On Wed, Aug 10, 2011 at 3:02 PM, Micah Caldwell <[email protected]> wrote: > Making the change you have suggested results in: > > Server Error: Invalid primary key for > com.zoltu.jdo_requestfactory_test.server.MyEntity. The primary key field is > an encoded String but an unencoded value has been provided. If you want to > set an unencoded value on this field you can either change its type to be an > unencoded String (remove the "gae.encoded-pk" extension), change its type to > be a com.google.appengine.api.datastore.Key and then set the Key's name > field, or create a separate String field for the name component of your > primary key and add the "gae.pk-name" extension. > > I should specify that I do want to be able to set the primary key > manually. I have a unique string identifier I would like to use as the > primary key for MyEntity. Also, attempting to use a Long results in the > same problem. > http://www.datanucleus.org/products/accessplatform/jdo/primary_key.html shows > that most of the basic types have special Identity classes, none of which > can be sent to the client (client can only receive basic types according to > http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#transportable > ). > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-web-toolkit/-/yvVeairI37UJ. > > 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-web-toolkit?hl=en. > -- Odeyemi 'Kayode O. http://www.sinati.com. t: @charyorde -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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-web-toolkit?hl=en.
