IntelliJ IDEA 2017.1 Help

Creating and Editing Relationships Between Domain Classes

This feature is supported in the Ultimate edition only.

Use the Domain classes dependencies diagram for creating and editing relationships between the domain classes.

The diagram is completely synchronized with the source code: the changes in the source code are immediately reflected in the diagram, and vice versa, adding or deleting a link in diagram introduces relevant changes to the source code.

To create relationship between domain classes

  1. Select the desired domain class, and click the Domain classes dependencies tab that is located on the bottom of the editor.
  2. Click the source domain class and draw a link to the target domain class:
    /help/img/idea/2017.1/grailsLink1.png
  3. In the dialog box that opens, specify the type of relationship, and the name of the field to be created:
    /help/img/idea/2017.1/grailsLink2.png

    The resulting relationship is displayed in diagram:

    /help/img/idea/2017.1/grailsLink3.png

See Also

Last modified: 18 July 2017