Google AppEngine/Datastore
DataNucleus supports persisting/retrieving objects to/from Google AppEngine/Datastore
(using the datanucleus-appengine
plugin). Simply specify your connection details as follows
datanucleus.ConnectionURL=appengine:
Versions 1.x of the plugin have major drawbacks resulting in a very poor reflection of JDO/JPA.
Versions 2.0.x of the plugin are for use with DataNucleus v3.0.
Versions 2.1.x of the plugin are for use with DataNucleus v3.1.
Version 3.0.x of the plugin is for use with DataNucleus v3.2 (see SVN trunk of the GAE plugin).
Once you have specified your connection details you then create your PMF/EMF as normal
and use JDO/JPA as normal. Things to bear in mind with AppEngine/Datastore usage :-
- Querying can be performed using JDOQL or JPQL. Some query constructs are evaluated in
the datastore, and you can request that any others are handled in-memory.
If you want queries to automatically evaluate unsupported constructs in-memory just set the
persistence property datanucleus.appengine.query.inMemoryWhenUnsupported
to "true"
- Relation Mode : by default all relations are owned meaning that when related
objects are persisted they are owned by the original object and their "id" contains the
Key of the owner object. You can set datanucleus.appengine.relationDefault
to unowned and make all relations default to unowned, just like all other supported
datastores
References
Some references that may be of some use