Hi Shawn. In this case, yes, you'll have to re-fetch the entity to update
it. Even though you have the ID of the entity in your custom bean, all of
the metadata that is associated with the detached entity is lost. If you
re-fetch the entity (detach it if you immediately close the
PersistenceManager after fetching), then update the fields and call
makePersistent, this should work.
- Jason

On Mon, Jul 13, 2009 at 2:16 AM, Shawn Brown <big.coffee.lo...@gmail.com>wrote:

>
> Hello,
>
> I'm seeing "Attempt was made to manually set the id component of a Key
> primary key.  If you want to control the value of the primary key, set
> the name component instead."
>
> Do I have to fetch an object before updating it?
>
> I'm fetching (dataClass) from the store with detachable=true
> then copying the data to a bean for serialization to my GWT client
> when it returns, I create a new (dataClass) instance containing the id
> of the original.
>
> Does that make sense?
>
> Should be trying something like
>
> http://www.datanucleus.org/products/accessplatform_1_1/jdo/attach_detach.html
>
> Thanks for your good advice!
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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-java@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