Simple demonstration of using JDO with DataNucleus
You can run this with any supported datastore by simply editing the followingfiles :
(1) src/main/resources/META-INF/persistence.xml [Edit the datastore details here]
(2) pom.xml [Edit the dependency jars for your datastore]
Maven Instructions:
1. Run the command "mvn clean compile". This builds everything and enhances the classes.
2. Run the command "mvn datanucleus:schema-create". This creates the schema for the tutorial.
3. Run the command "mvn exec:java". This runs the tutorial.
4. Run the command "mvn datanucleus:schema-delete". This deletes the schema for the tutorial.
http://www.datanucleus.org/products/accessplatform_3_0/guides/jdo/tutorial_mongodb.html
本文介绍了一个简单的示例,演示如何使用JDO与DataNucleus进行数据库操作。通过编辑配置文件和依赖项可以适配不同的数据存储。文章提供了详细的步骤说明,包括构建项目、创建和删除数据库模式等。
5145

被折叠的 条评论
为什么被折叠?



