cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
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


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/0554aa26
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/0554aa26
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/0554aa26

Branch: refs/heads/master
Commit: 0554aa26d274763edb947cd6e07f99f7ddd3a764
Parents: 7d88ac5
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Sat Dec 22 16:40:15 2018 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
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(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/0554aa26/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part1/modeler.adoc
----------------------------------------------------------------------
diff --git 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
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
addition
 
 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
gene
 
 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
keys.
+
+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
keys.
+
+Strategy should be set per each `DbEntity` independently.
 
-==== Modeling Primary Key Generation Strategy
\ No newline at end of file
+image::../images/db-entity-pk.png[align="center"]

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0554aa26/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part1/setup.adoc
----------------------------------------------------------------------
diff --git 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
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[]
 
 |4.1
 |Java 1.8 or newer
-|Development
+|Beta
 
 |4.0
 |Java 1.7 or newer
-|Beta
+|Stable
 
 |3.1
 |Java 1.5 or newer

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0554aa26/docs/asciidoc/cayenne-guide/src/docs/asciidoc/images/db-entity-pk.png
----------------------------------------------------------------------
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
differ


Mime
View raw message