cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cayenne git commit: Update docs
Date Sat, 22 Dec 2018 13:40:22 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 7d88ac545 -> 0554aa26d

Update docs


Branch: refs/heads/master
Commit: 0554aa26d274763edb947cd6e07f99f7ddd3a764
Parents: 7d88ac5
Author: Nikita Timofeev <>
Authored: Sat Dec 22 16:40:15 2018 +0300
Committer: Nikita Timofeev <>
Committed: Sat Dec 22 16:40:15 2018 +0300

 .../asciidoc/_cayenne-guide/part1/modeler.adoc  |  24 ++++++++++++-------
 .../asciidoc/_cayenne-guide/part1/setup.adoc    |   4 ++--
 .../src/docs/asciidoc/images/db-entity-pk.png   | Bin 0 -> 35089 bytes
 3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part1/modeler.adoc
index decd253..55108ce 100644
--- a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part1/modeler.adoc
+++ b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part1/modeler.adoc
@@ -14,8 +14,6 @@
 === CayenneModeler Application
-==== Working with Mapping Projects
 ==== Reverse Engineering Database
 See chapter <<Reverse Engineering in Cayenne Modeler>>
@@ -26,8 +24,6 @@ With Cayenne Modeler you can create simple database schemas without any
 You can select what database parts should be generated and what tables you want
-==== Migrations
 ==== Generating Java Classes
 Before using Cayenne in you code you need to generate java source code for persistent objects.
This can be done with Modeler GUI or via <<cgen>> maven/ant plugin.
@@ -42,12 +38,12 @@ Default type of generation suitable for almost all cases. Use this type
unless y
 - *Client Persistent Objects*
+This type is for generating code for client part of a ROP setup.
 - *Advanced*
 In advanced mode you can control almost all aspects of code generation including custom templates
for java code. See default Cayenne templates on GitHub as an example.
-==== Modeling Inheritance
 ==== Modeling Generic Persistent Classes
 Normally each ObjEntity is mapped to a specific Java class (such as Artist or Painting) that
explicitly declare all entity properties as pairs of getters and setters. However Cayenne
allows to map a completly generic class to any number of entities. The only expectation is
that a generic class implements org.apache.cayenne.DataObject. So an ideal candidate for a
generic class is CayenneDataObject, or some custom subclass of CayenneDataObject.
@@ -56,6 +52,18 @@ If you don't enter anything for Java Class of an ObjEntity, Cayenne assumes
 Class generation procedures (either done in the Modeler or with Ant or Maven) would skip
entities that are mapped to CayenneDataObject explicitly or have no class mapping.
-==== Mapping ObjAttributes to Custom Classes
+==== Modeling Primary Key Generation Strategy
+Cayenne supports three PK generation strategies:
+1. *Cayenne Generated*.
+This is default strategy. Cayenne will use special table `AUTO_PK_SUPPORT` for managing primary
+1. *Database Generated*.
+Cayenne will delegate PK generation to database (e.g. auto increment fields on MySQL or `serial`
type on PostgreSQL)
+1. *Custom Sequence*. In this case Cayenne will use provided sequence to generate primary
+Strategy should be set per each `DbEntity` independently.
-==== Modeling Primary Key Generation Strategy
\ No newline at end of file
diff --git a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part1/setup.adoc
index b0a944a..2edd2f0 100644
--- a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part1/setup.adoc
+++ b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part1/setup.adoc
@@ -28,11 +28,11 @@ include::../var.adoc[]
 |Java 1.8 or newer
 |Java 1.7 or newer
 |Java 1.5 or newer
diff --git a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/images/db-entity-pk.png b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/images/db-entity-pk.png
new file mode 100644
index 0000000..ba62a90
Binary files /dev/null and b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/images/db-entity-pk.png

View raw message