Hi,

I'm having trouble updating a class which has an array of ints:

  @PersistenceCapable
  class Foo {
      @Persistent
      @Extension(vendorName = "datanucleus", key = "gae.unindexed",
value="true")
      int[] vals;
   }

  ...

  Foo foo = new Foo();
  foo.vals = new int[] { 1, 2, 3 };
  pm.makePersistent(foo);

The first time an instance is created, the values are all there ok. If
I try updating them though, the changes never persist:

  public void updateFoo(PersistenceManagerFactory pmf) {
      PersistenceManager pm = pmf.getPersistenceManager();
      Foo foo = pm.getObjectById(Foo.class, myKey);
      foo.vals[0] = 100;
      pm.makePersistent(foo);
  }

I print the values out directly after the call on the foo object
instance, and the update seems to have worked in memory. However, the
next time I call updateFoo(), the values are once again starting at
{ 1, 2, 3 }, and not { 100, 2, 3 } as I'm expecting. What am I doing
wrong?

Thanks

-- 
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-j...@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