This is an automated email from the ASF dual-hosted git repository. ntimofeev pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/master by this push: new f8d9c66 Update tutorial to match latest Modeler f8d9c66 is described below commit f8d9c6613da63586080391a192d64adbf6490ca0 Author: Nikita Timofeev <stari...@gmail.com> AuthorDate: Fri Feb 7 16:17:04 2020 +0300 Update tutorial to match latest Modeler --- .../asciidoc/_getting-started-guide/java-classes.adoc | 11 ++++++----- .../src/docs/asciidoc/images/class-generation.png | Bin 0 -> 122635 bytes 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/asciidoc/getting-started-guide/src/docs/asciidoc/_getting-started-guide/java-classes.adoc b/docs/asciidoc/getting-started-guide/src/docs/asciidoc/_getting-started-guide/java-classes.adoc index 64734a7..08f976f 100644 --- a/docs/asciidoc/getting-started-guide/src/docs/asciidoc/_getting-started-guide/java-classes.adoc +++ b/docs/asciidoc/getting-started-guide/src/docs/asciidoc/_getting-started-guide/java-classes.adoc @@ -19,14 +19,15 @@ database schema step. Still be aware that you can do it if you need to via "Tool Create Database Schema". ==== Creating Java Classes -- Select "Tools > Generate Classes" menu. +- Select your datamap in a project tree and open "Class Generation" tab. - For "Type" select "Standard Persistent Objects", if it is not already selected. - For the "Output Directory" select "`src/main/java`" folder under your IDEA project folder (this is a "peer" location to the `cayenne-*.xml` location we selected before). -- Click on "Classes" tab and check the "Check All Classes" checkbox -(unless it is already checked and reads "Uncheck all Classes"). -- Click "Generate" +- Select all object entities (unless they are already checked). +- Finally, click "Generate" + +image::class-generation.png[align="center"] Now go back to IDEA - you should see pairs of classes generated for each mapped entity. You probably also see that @@ -76,7 +77,7 @@ or commons-logging) through bridges. image::idea-generated-classes.png[align="center"] -Now let's check the entity class pairs. Each one is made of a superclass (e.g. `\_Artist`) +Now let's check the entity class pairs. Each one is made of a superclass (e.g. `auto/\_Artist`) and a subclass (e.g. `Artist`). You *should not* modify the superclasses whose names start with "_" (underscore), as they will be replaced on subsequent generator runs. Instead all custom logic should be placed in the subclasses diff --git a/docs/asciidoc/getting-started-guide/src/docs/asciidoc/images/class-generation.png b/docs/asciidoc/getting-started-guide/src/docs/asciidoc/images/class-generation.png new file mode 100644 index 0000000..71a5da2 Binary files /dev/null and b/docs/asciidoc/getting-started-guide/src/docs/asciidoc/images/class-generation.png differ