I have a Recipe. Each Recipe has an image. So my entity looks something like

@PersistenceCapable
public class Recipe {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;
    @Persistent
    private MyImage myImage;

When I create the Recipe the first time, it works great, the image is
added as well and I can view it. However when I go and update it such
as

        PersistenceManager pm = PMF.get().getPersistenceManager();
        Recipe r = pm.getObjectById(Recipe.class, recKey);
        try {
            r.setImage(newImage);
        } finally {
            pm.close();
        }

the new image is added to the data-store, but when I try and fetch it
from within the recipe, the recipe still points to the old image in my
data-store. Is this normal? How can I fix this?

-- 
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