2d or 3d array in Google App Engine persistence?

谁都会走 提交于 2020-01-05 14:17:17

问题


Using JDO and Persistence, I'm able to successfully store an ArrayList field and retrieve it from a class later. Unfortunately, arrays like myobject[][][] are not supported, as stated in documentation. I tried ArrayList<ArrayList<myobject>>, but this gives many errors, and careful reading of the documentation would seem to suggest this may not be possible.

Is it possible to persist an array of two or more dimensions? If so, what is the most correct way to do this?


回答1:


If you want multiple dimensions and don't intend to query on any of the values therein, use Java serialization and store the result as a blob.



来源:https://stackoverflow.com/questions/8470460/2d-or-3d-array-in-google-app-engine-persistence

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!