This example describes how to persist 2 classes that have a collection relationship between them. What we mean by that is that we have 2 classes Pack and Card such that each Pack can contain many Cards. We will show the classes that represent our example, and how we develop the JDO Meta-Data to represent them in the datastore. The process of using JDO is split into 3 areas for this example. This is the most common subdivision in our experience, for explaining the ideas involved.
The full code is available for download from SourceForge. If you have any queries about this example, please raise them on our Forum. |