Do I have to re-apply db4o configuration settings (and indexes) on each application run, or only on database creation?

青春壹個敷衍的年華 提交于 2019-12-11 07:08:07

问题


I'm in the process of evaluating db4o and I have a pretty simple question. Does the db4o configuration settings (e.g. Transparent Activation) and indexes need to be setup each time the application runs and/or the database is loaded, or can all this be setup at the time the database is created?

For reference - I'm building an Android application and the database is going to be prebuilt on the desktop and shipped with the app.


回答1:


just as an FYI, there is an exception .. indexes once created are saved and will be used regardless of their specification at OpenFile/Connection time.

Best, Robert




回答2:


After more digging in the documentation for db4o I found my answer :)

"Configuration settings are not stored in db4o database files. Accordingly the same configuration has to be submitted every time an ObjectContainer/ObjectServer is opened. For using db4o in client/server mode it is recommended to use the same configuration on the server and on the client. To set this up nicely it makes sense to create one application class with one method that creates an appropriate configuration and to deploy this class both to the server and to all clients."



来源:https://stackoverflow.com/questions/4370062/do-i-have-to-re-apply-db4o-configuration-settings-and-indexes-on-each-applicat

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