Changes for page Your First Rest Project

Last modified by Steve Peery on 2013/09/06 11:02

From version 26.1
edited by Filippo Laurìa
on 2013/07/22 12:46
Change comment: There is no comment for this version
To version 27.1
edited by Filippo Laurìa
on 2013/07/22 12:51
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -228,6 +228,8 @@
228 228  
229 229  Now, it's time to link the two entities together. An Author can have multiple blog entries, and a BlogEntry can only have one author. To create the relationship (the join), right-click on **Author** and select **New Relationship**. On your right, select **BlogEntry** in the list. On your left, select **to many BlogEntries**, and on your right, select **to one Author**. Now, in BlogEntry, we need to store the primary key of the author so that we can make the join. The relationship builder allow us to add that attribute, so make sure **and a new foreign key named** is checked (it is checked by default). The **Create Relationship** pane should look like this:
230 230  
231 +[[image:attach:relationship.png]]
232 +
231 231  If you check in the **Outline** tab, you should see that **Author** now have a **blogEntries** relationship, and **BlogEntry** have a **author** relationship.
232 232  
233 233  You are now ready to save the model. Save it (File -> Save) and close the **Entity Modeler** window. If you open the **Sources** in the main Eclipse window, you will notice that the **Sources** folder contains a package named **your.app.model**. (If this folder doesn't appear, you may need to set your preferences to automatically generate these source files; see the second suggestion on [[http:~~/~~/wiki.wocommunity.org/display/documentation/Useful+Eclipse+or+WOLips+Preferences>>url:http://wiki.wocommunity.org/display/documentation/Useful+Eclipse+or+WOLips+Preferences||rel="nofollow" shape="rect" class="external-link"]].)