From 97b03a200f6e3ec9934ca8f3168cadbc3d8b9a73 Mon Sep 17 00:00:00 2001 From: nhauge Date: Mon, 12 May 2008 16:54:14 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'v20080512000'. --- .../getting_started016.htm | 83 ---------------------- 1 file changed, 83 deletions(-) delete mode 100644 jpa/plugins/org.eclipse.jpt.doc.user/getting_started016.htm (limited to 'jpa/plugins/org.eclipse.jpt.doc.user/getting_started016.htm') diff --git a/jpa/plugins/org.eclipse.jpt.doc.user/getting_started016.htm b/jpa/plugins/org.eclipse.jpt.doc.user/getting_started016.htm deleted file mode 100644 index 0f604093dd..0000000000 --- a/jpa/plugins/org.eclipse.jpt.doc.user/getting_started016.htm +++ /dev/null @@ -1,83 +0,0 @@ - - -
- - - -Use a One-to-One Mapping to define a relationship from an attribute to another class, with one-to-one multiplicity to a database column. In the Tutorial Object Model, the address field of the Employee class has a one-to-one relationship to the Address class; each employee may have a single address.
-Select the Employee entity in the Package Explorer view.
-In the JPA Structure view, select the address field of the Employee entity. The JPA Details view (for attributes) displays the properties for the field.
-In the Map As field, select One-to-One.
- -For the Target Entity, click Browse and select the Address persistent entity. Dali adds the @OneToOne(targetEntity=dali.tutorial.model.Address.class)
entity to the class.
Leave the other fields with their default values.
-Select the Override Default option to specify the relationship between the Employee and Address entities. Because you had to explicitly define the ID field for the Address entity in its ID mapping, you will need to edit the default join relationship.
-Select the address_ADDRESS_ID -> ADDRESS_ID relationship in the Join Columns area and click Edit.
-In the Edit Join Column dialog, select the following options and click OK.
-Name: ADDR_ID (from the EMPLOYEE table)
-Referenced Column Name: ADDRESS_ID (from the ADDRESS table)
-In the JPA Structure, the address field is identified as a one-to-one mapping, as shown in the following figure:
- - -Next, you will Create one-to-many mappings.
-