我有一些关于谷歌应用程序引擎/数据存储和存储动态对象的问题。
首先是我的项目的一些背景信息。我想将此功能添加到我当前的 java 应用程序引擎站点:我希望客户能够制作自定义表单并将这些表单中的数据存储到数据存储中。现在,表单有一些常见的元素,如文本区域、下拉菜单、文本区域和文件上传框。他们还可以添加复选框并将该对象的权限更改给他们管理的客户端。
我的主要问题是使用数据存储存储这些数据的最佳方式是什么?有什么办法可以让我拥有一个包含所有可能性的对象吗?
或者我应该寻找一种动态分配对象并将其放入数据存储中的方法?这样做的一个问题可能是在后续上传中保留生成的字节码。
欢迎对此问题提出任何想法和/或煽动。
I have a few questions about google app engine / datastore and storing dynamic objects.
First here is some background information on my project. I would like to add this feature to my current java app engine site: I would like to have customers that make custom forms and store data from those forms into datastore. Now the forms have a few common elements like textarea, drop-down menus, text areas, and file upload boxes. They can also add check boxes and change permissions of that object to the clients they have under their management.
What my main questions are is what is the best way to store this data with datastore? Is there any way that I can have one object that encompasses all the posibilities?
Or should I look into finding a way to dynamically allocating an object and placing it into the data store? One problem with this might be keeping generated bytecode with subsequent uploads.
Any ideas and/or incites into this problem will be welcome.
发布评论
评论(1)
如果您使用低-level API 你可以拥有一个包含所有数据的对象。所有字段最终都会成为 BlobStore API。
If you use the low-level API you can have one object that contains all the data. All the fields end up being properties in an Entity. For the files you should of course use the BlobStore API.