开发者

unable to add objects to saved collection in GAE using JDO

开发者 https://www.devze.com 2022-12-26 11:22 出处:网络
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.

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


"no matching index found" Perhaps you need to add some index in GAE/J's datastore ? Nothing to do with JDO

0

精彩评论

暂无评论...
验证码 换一张
取 消