unable to add objects to saved collection in GAE

Posted by Jeffrey Chee on Stack Overflow See other posts from Stack Overflow or by Jeffrey Chee
Published on 2010-04-09T08:17:34Z Indexed on 2010/04/09 8:23 UTC
Read the original article Hit count: 182

Filed under:

I have a ClassA containing an ArrayList of another ClassB

I can save a new instance of ClassA with ClassB instances also saved using JDO. However, When I retrieve the instance of Class A, I try to do like the below:

ClassA instance = PMF.get().getPersistenceManager().GetObjectByID( someid );
instance.GetClassBArrayList().add( new ClassB(...) );

I get an Exception like the below: Uncaught exception from servlet com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found..

So I was wondering, Is it possible to add a new item to the previously saved collection? Or was it something I missed out.

Best Regards

© Stack Overflow or respective owner

Related posts about google-app-engine