You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by bu...@apache.org on 2016/12/14 13:22:26 UTC

svn commit: r1002786 [24/25] - in /websites/staging/cayenne/trunk/content: ./ docs/4.0/api/ docs/4.0/api/org/apache/cayenne/ docs/4.0/api/org/apache/cayenne/access/ docs/4.0/api/org/apache/cayenne/access/class-use/ docs/4.0/api/org/apache/cayenne/acces...

Added: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-filtering.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-filtering.html (added)
+++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-filtering.html Wed Dec 14 13:22:24 2016
@@ -0,0 +1,257 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+   <title xmlns:d="http://docbook.org/ns/docbook">Chapter&nbsp;20.&nbsp;Filtering</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 4.0 documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 4.0"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part4.html" title="Part&nbsp;IV.&nbsp;DB-First Flow"><link rel="prev" href="re-introduction.html" title="Chapter&nbsp;19.&nbsp;Introduction"><link rel="next" href="re-relationships-loading-control.html" title="Chapter&nbsp;21.&nbsp;Other Settings"><script xmlns:d="http://docbook.org/ns/docbook" type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-7036673-1']);
+  _gaq.push(['_trackPageview']);
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+        </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.4.0 (4.0.M5-SNAPSHOT)</th><th align="center">Chapter&nbsp;20.&nbsp;Filtering</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re-introduction.html">Prev</a>&nbsp;</td><th width="60%" align="center"><a accesskey="u" href="cayenne-guide-part4.html">Part&nbsp;IV.&nbsp;DB-First Flow</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="re-relationships-loading-control.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="re-filtering"></a>Chapter&nbsp;20.&nbsp;Filtering</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="re-filtering.html#everything-schema-catalog">Proces
 s everything from schema/catalog</a></span></dt><dt><span class="section"><a href="re-filtering.html#combine-schema-catalog">Combine Schema and Catalog filters</a></span></dt><dt><span class="section"><a href="re-filtering.html#including-excluding-tables-columns-procedures">Including and Excluding tables, columns and procedures</a></span></dt><dt><span class="section"><a href="re-filtering.html#complete-filtering-example">Complete filtering example</a></span></dt><dt><span class="section"><a href="re-filtering.html#d0e3286">Ant configuration example</a></span></dt></dl></div><p>
+        The first thing you usually want to control during reverse engineering is what exactly should be loaded from database and
+        what not. One of the most common cases is excluding system tables, as you usually don't want to map them.
+    </p><p>
+        Briefly, you are able to include/exclude tables, columns and procedures and do it at several levels: default, catalog, schema.
+        Although everything defined at the top level (default rules) will be applied for the nested elements, all rules from the most specific
+        areas will override general rules (i.e. rules from schemas override rules from catalogs and even more override default rules).
+    </p><p>
+        The following use-cases will provide you a better understanding of how filtering works and how you could use it.
+    </p><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="everything-schema-catalog"></a>Process everything from schema/catalog</h2></div></div></div><p>
+            The simplest example of reverse engineering is processing tables from one schema of catalog and there are several options to do this. 
+            Basic syntax is described below:
+        </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Ant/Maven in case you only want to specify the schema to import --&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>SCHEMA_NAME<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Maven way in case you have nested elements in the schema  --&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>SCHEMA_NAME<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+        ...
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Ant way in case you have nested elements in the schema --&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">name</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"SCHEMA_NAME"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&gt;</span>
+        ...
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span>        </pre><p>
+            The same options are available for catalogs:
+        </p><pre class="programlisting"> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Ant/Maven in case you only want to specify the catalog to import --&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>CATALOG_NAME<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Maven way in case you have nested elements in the catalog --&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>CATALOG_NAME<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+        ...
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Ant way in case you have nested elements in the catalog --&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">name</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"CATALOG_NAME"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&gt;</span>
+        ...
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span></pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Current version of reverse engineering doesn't support catalog filtering for Postgres database.</p></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="combine-schema-catalog"></a>Combine Schema and Catalog filters</h2></div></div></div><p>
+            Cayenne supports combination of different schemas and catalogs, and it filters data according to your requirements. 
+            You could achieve this by the following example of reverse engineering configuration:
+        </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>shop_01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>shop_02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>shop_03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span></pre><p>
+            In the example above, Cayenne reverse engineering process contains three catalogs named as shop_01, shop_02 and shop_03, 
+            each of wich has their own schemas. Cayenne will load all data only from the declared catalogs and schemas.
+        </p><p>
+            If you want to load everything from database, you could simply declare catalog specification alone.
+        </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>shop_01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>shop_02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>shop_03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span></pre><p>
+            If you want to do reverse engineering for specific schemas, just remove unwanted schemas from the catalog section. 
+            For example, if you want to process schema-name-01 and schema-name-03 schemas only, then you should change reverse engineering section like this.
+        </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>shop_01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>shop_02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>shop_03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;schema&gt;</span>schema-name-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/schema&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span></pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="including-excluding-tables-columns-procedures"></a>Including and Excluding tables, columns and procedures</h2></div></div></div><p>
+            Cayenne reverse engineering let you fine tune table, columns and stored procedures names that you need to import
+            to your model file. In every filter you can use regexp syntax. Here is some examples of configuration
+            for common tasks.
+        </p><p>
+            </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Include tables with &#8216;CRM_&#8217; prefix if you are working in that domain of application:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>CRM_.*<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span></pre></li><li class="listitem"><p>Include tables with &#8216;_LOOKUP&#8217; suffix</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>.*_LOOKUP<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span></pre></li><li class="listitem"><p>Exclude tables with &#8216;CRM_&#8217; prefix if you are not working only in that domain of application:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeTable&gt;</span>CRM_.*<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeTable&gt;</span></pre></li><li class="listitem"><p>Include only specific columns that follows specific naming convention:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeColumn&gt;</span>includeColumn01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeColumn&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeColumn&gt;</span>includeColumn03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeColumn&gt;</span></pre></li><li class="listitem"><p>Exclude system or obsolete columns:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeColumn&gt;</span>excludeColumn01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeColumn&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeColumn&gt;</span>excludeColumn03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeColumn&gt;</span></pre></li><li class="listitem"><p>Include/Exclude columns for particular table or group of tables:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>table pattern<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeColumn&gt;</span>includeColumn01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeColumn&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeColumn&gt;</span>excludeColumn01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeColumn&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span></pre></li><li class="listitem"><p>Include stored procedures:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeProcedure&gt;</span>includeProcedure01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeProcedure&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeProcedure&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>includeProcedure03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeProcedure&gt;</span></pre></li><li class="listitem"><p>Exclude stored procedures by pattern:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeProcedure&gt;</span>excludeProcedure01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeProcedure&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeProcedure&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>excludeProcedure03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeProcedure&gt;</span></pre></li></ol></div><p>
+        </p><p> All filtering tags <code class="code">&lt;includeTable&gt;</code>,
+                <code class="code">&lt;excludeTable&gt;</code>, <code class="code">&lt;includeColumn&gt;</code>,
+                <code class="code">&lt;excludeColumn&gt;</code>, <code class="code">&lt;includeProcedure&gt;</code> and
+                <code class="code">&lt;excludeProcedure&gt;</code> have 2 ways to pass filtering RegExp.
+                </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>text inside tag</p><pre class="programlisting">
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>CRM_.*<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span></pre></li><li class="listitem"><p>pattern inner tag</p><pre class="programlisting">
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>.*_LOOKUP<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span></pre></li></ol></div><p>
+        </p><p>
+            All filtering tags can be placed inside schema and catalog tags, but also inside <code class="code">&lt;reverseEngineering&gt;</code> tag. It means that filtering rules
+            will be applied for all schemas and catalogs.
+        </p></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="complete-filtering-example"></a>Complete filtering example</h2></div></div></div><p>
+            Initially, let&#8217;s make a small sample. Consider the following reverse engineering configuration.
+        </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>shop-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span>   </pre><p>
+            In this case reverse engineering will not filter anything from the shop-01 catalog. If you really want to filter database columns, tables, 
+            stored procedures and relationships, you could do it in the following way.
+        </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>shop-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>shop-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>includeTable-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span></pre><p>
+            Then Cayenne will do reverse engineering for both shop-01 and shop-02 catalogs. First catalog will not be processed for filtering,
+            but the second catalog will be processed with &#8220;includeTable-01&#8221; filter. 
+        </p><p>
+            Let&#8217;s assume you have a lot of table prefixes with the same names. Cayenne allows you to mention a pattern as regular expression.
+            Using regular expressions is easier way to handle a big amount of database entities than writing filter config for each use-case.
+            They make your configuration more readable, understandable and straightforward. There is not complex.
+            Let&#8217;s see how to use patterns in reverse engineering configuration with complete example.
+        </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>shop-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>shop-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>shop-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>includeTable-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>includeTable-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>includeTable-03<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeColumn&gt;</span>includeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeColumn&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeColumn&gt;</span>excludeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeColumn&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeTable&gt;</span>excludeTable-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeTable&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeTable&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>excludeTable-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeTable&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeColumn&gt;</span>includeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeColumn&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeColumn&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>includeColumn-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeColumn&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeColumn&gt;</span>excludeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeColumn&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeColumn&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>excludeColumn-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeColumn&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeProcedure&gt;</span>includeProcedure-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeProcedure&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeProcedure&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>includeProcedure-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeProcedure&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeProcedure&gt;</span>excludeProcedure-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeProcedure&gt;</span>
+
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeProcedure&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;pattern&gt;</span>excludeProcedure-02<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/pattern&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeProcedure&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span></pre><p>The example above should provide you more idea about how to use filtering and patterns
+            in Cayenne reverse engineering. You could notice that this example demonstrates you the
+            "name" and "pattern" configurations. Yes, you could use these as separates xml element
+            and xml attributes. </p><p>
+            The cdbimport will execute reverse engineering task for all entities from &#8220;shop-01&#8221; and &#8220;shop-02&#8221;, including tables, views, stored procedures
+            and table columns. As &#8220;shop-03&#8221; has variety filter tags, entities from this catalog will be filtered by cdbimport.
+        </p></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="d0e3286"></a>Ant configuration example</h2></div></div></div><p> Here is config sample for <code class="code">Ant</code> task:
+            </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- inside &lt;cdbimport&gt; tag --&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>shop-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">name</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"shop-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/&gt;</span>
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">name</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"shop-03"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>includeTable-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"includeTable-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"includeTable-03"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeColumn&gt;</span>includeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeColumn&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeColumn&gt;</span>excludeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeColumn&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeTable&gt;</span>excludeTable-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeTable&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeTable</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"excludeTable-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeColumn&gt;</span>includeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeColumn&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeColumn</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"includeColumn-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeColumn&gt;</span>excludeColumn-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeColumn&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeColumn</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"excludeColumn-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeProcedure&gt;</span>includeProcedure-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeProcedure&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeProcedure</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"includeProcedure-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/&gt;</span>
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeProcedure&gt;</span>excludeProcedure-01<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeProcedure&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeProcedure</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-attribute">pattern</span>=<span xmlns="http://www.w3.org/1999/xhtml" class="hl-value">"excludeProcedure-02"</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">/&gt;</span>
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span></pre><p>
+        </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
+                In Ant task configuration all filter tags located inside root tag <code class="code">&lt;cdbimport&gt;</code> as there is no <code class="code">&lt;reverseEngineering&gt;</code> tag.
+            </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re-introduction.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part4.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="re-relationships-loading-control.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;19.&nbsp;Introduction&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;21.&nbsp;Other Settings</td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-introduction.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-introduction.html (added)
+++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-introduction.html Wed Dec 14 13:22:24 2016
@@ -0,0 +1,52 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+   <title xmlns:d="http://docbook.org/ns/docbook">Chapter&nbsp;19.&nbsp;Introduction</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 4.0 documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 4.0"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part4.html" title="Part&nbsp;IV.&nbsp;DB-First Flow"><link rel="prev" href="cayenne-guide-part4.html" title="Part&nbsp;IV.&nbsp;DB-First Flow"><link rel="next" href="re-filtering.html" title="Chapter&nbsp;20.&nbsp;Filtering"><script xmlns:d="http://docbook.org/ns/docbook" type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-7036673-1']);
+  _gaq.push(['_trackPageview']);
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+        </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.4.0 (4.0.M5-SNAPSHOT)</th><th align="center">Chapter&nbsp;19.&nbsp;Introduction</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="cayenne-guide-part4.html">Prev</a>&nbsp;</td><th width="60%" align="center"><a accesskey="u" href="cayenne-guide-part4.html">Part&nbsp;IV.&nbsp;DB-First Flow</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="re-filtering.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="re-introduction"></a>Chapter&nbsp;19.&nbsp;Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="re-introduction.html#what-is-cdbimport">"DB-first" Flow</a
 ></span></dt><dt><span class="section"><a href="re-introduction.html#re-configuration-file">Introduction to "cdbimport"</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="what-is-cdbimport"></a>"DB-first" Flow</h2></div></div></div><p>An ORM system consists of three parts: database, OR mapping and persistent Java classes.
+			These parts always need to be kept in sync with each other for the application to work.
+			"DB-first" flow is a common and practical approach to synchronization that assumes the
+			database to be the master source of the metadata, with other two parts synchronized from
+			the DB as the schema evolves. Cayenne provides a number of tools to automate and control
+			it. Here is how "DB-first" flow is typically implemented:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> A SQL migrations framework is used to bring a local DB to a certain
+						version. This is outside of the scope of Cayenne and is done with a
+						third-party tool, such as Liquibase or Flyway.</p></li><li class="listitem"><p>OR mapping model (Cayenne XML files) are synchronized with the state of the database
+						using <code class="code">"cdbimport"</code> tool provdied by Cayenne.</p></li><li class="listitem"><p>Object layer of the OR mapping model is customized to the developer liking, usually via
+						CayenneModeler. Subsequent runs of <code class="code">"cdbimport"</code> will not
+						override any customizations that you make.</p></li><li class="listitem"><p>Java classes are generated using <code class="code">"cgen"</code> tool provided by Cayenne.</p></li></ul></div><p>"cgen" and "cdbimport" tools can be invoked from Maven or Ant as discussed in the
+			"Including Cayenne in a Project" chapter or run from CayenneModeler. This chapter will
+			mostly focus on "cdbimport". </p><p>
+			Here is simple maven configuration to start with:
+			
+			
+		</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="re-configuration-file"></a>Introduction to "cdbimport"</h2></div></div></div><p>Here is a simple Maven configuration of "cdbimport" (for details see <a class="link" href="including-cayenne-in-project.html#mvn-cdbimport" title="cdbimport">maven-cayenne-plugin</a> documentation)</p><p>
+			</p><pre class="programlisting">
+	<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;plugin&gt;</span>
+		<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;groupId&gt;</span>org.apache.cayenne.plugins<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/groupId&gt;</span>
+		<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;artifactId&gt;</span>maven-cayenne-plugin<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/artifactId&gt;</span>
+		<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;version&gt;</span>4.0.M5-SNAPSHOT<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/version&gt;</span>
+
+		<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;configuration&gt;</span>
+			<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;map&gt;</span>${project.basedir}/src/main/resources/datamap.map.xml<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/map&gt;</span>
+			<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;url&gt;</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- jdbc url --&gt;</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/url&gt;</span>
+			<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;driver&gt;</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- jdbc driver class --&gt;</span><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/driver&gt;</span>
+			<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;username&gt;</span>username<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/username&gt;</span>
+			<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;password&gt;</span>password<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/password&gt;</span>
+			<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;defaultPackage&gt;</span>com.example.package<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/defaultPackage&gt;</span>
+			<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+			    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;includeTable&gt;</span>.*<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/includeTable&gt;</span>
+			<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span>
+		<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/configuration&gt;</span>
+		<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;dependencies&gt;</span>
+			<span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- jdbc driver dependency --&gt;</span>
+		<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/dependencies&gt;</span>
+	<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/plugin&gt;</span>
+			</pre><p>
+		</p><p>In the next chapters we will discuss various filtering and other reverse-engineering
+			options.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="cayenne-guide-part4.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part4.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="re-filtering.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part&nbsp;IV.&nbsp;DB-First Flow&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;20.&nbsp;Filtering</td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-modeler.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-modeler.html (added)
+++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-modeler.html Wed Dec 14 13:22:24 2016
@@ -0,0 +1,42 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+   <title xmlns:d="http://docbook.org/ns/docbook">Chapter&nbsp;22.&nbsp;Reverse Engineering in Cayenne Modeler</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 4.0 documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 4.0"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part4.html" title="Part&nbsp;IV.&nbsp;DB-First Flow"><link rel="prev" href="re-relationships-loading-control.html" title="Chapter&nbsp;21.&nbsp;Other Settings"><link rel="next" href="configuration-properties.html" title="Appendix&nbsp;A.&nbsp;Configuration Properties"><script xmlns:d="http://docbook.org/ns/docbook" type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-7036673-1']);
+  _gaq.push(['_trackPageview']);
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+        </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.4.0 (4.0.M5-SNAPSHOT)</th><th align="center">Chapter&nbsp;22.&nbsp;Reverse Engineering in Cayenne Modeler</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re-relationships-loading-control.html">Prev</a>&nbsp;</td><th width="60%" align="center"><a accesskey="u" href="cayenne-guide-part4.html">Part&nbsp;IV.&nbsp;DB-First Flow</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="configuration-properties.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="re-modeler"></a>Chapter&nbsp;22.&nbsp;Reverse Engineering in Cayenne Modeler</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect
 ion"><a href="re-modeler.html#modeler-re-datasource">DataSource selection</a></span></dt><dt><span class="section"><a href="re-modeler.html#modeler-re-options">Reverse engineering options</a></span></dt></dl></div><p>Alternative aproach to using <a class="link" href="re-introduction.html#what-is-cdbimport" title="&#34;DB-first&#34; Flow">cdbimport </a> is doing
+        reverse engineering from <a class="link" href="setup.html#running-cayennemodeler" title="Running CayenneModeler">Cayenne Modeler</a>.
+        Currently modeler GUI doesn't support all features of ant/maven tasks but it suffice for
+        general DB import. Especially it's a good place to quickly start working on your data model. </p><p>
+        You can find reverse engineering tool in main modeler menu
+        <span class="strong"><strong>
+            <span class="guimenu">Tools</span> &gt; <span class="guimenuitem">Reengineer Database Schema</span>
+        </strong></span>
+    </p><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="modeler-re-datasource"></a>DataSource selection</h2></div></div></div><p>First you should select DataSource. If you don't have any DataSource
+            yet you can create one from this menu.
+            </p><div class="mediaobject"><img src="images/re-modeler-datasource-select.png" alt="Datasource selection dialog"><div class="caption"><p>Datasource selection dialog.</p></div></div><p>
+        </p></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="modeler-re-options"></a>Reverse engineering options</h2></div></div></div><p>Once DataSource is selected you can proceed to reverse engineering
+            options.
+            </p><div class="mediaobject"><img src="images/re-modeler-reverseengineering-dialog.png" alt="Reverse Engineering dialog"><div class="caption"><p>Reverse Engineering dialog.</p></div></div><p>
+        </p><p>
+            Here is a list of options to tune what will be processed by reverse engineering:
+            </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="strong"><strong>Select Catalog</strong></span>:
+                        catalog to process
+                        </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>You can only select one catalog. If you need to import multiple catalogs you need to run process several times.</p></div><p>
+                    </p></li><li class="listitem"><p><span class="strong"><strong>Table Name Pattern</strong></span>:
+                        RegExp to filter tables. Default pattern <code class="code">.*</code> includes all tables.
+                    </p></li><li class="listitem"><p><span class="strong"><strong>Procedure Name Pattern</strong></span>:
+                        RegExp to filter procedures. Default pattern <code class="code">.*</code> includes all stored procedures.
+                    </p></li><li class="listitem"><p><span class="strong"><strong>Naming Strategy</strong></span>:
+                        Currently there is only one naming strategy available.
+                        See ant/maven tools <a class="link" href="">documentation</a> for details about naming strategy.
+                    </p></li><li class="listitem"><p><span class="strong"><strong>Tables with Meaningful PK Pattern</strong></span>:
+                        Comma separated list of RegExp's for tables that you want to have meaningful primary keys.
+                        By default no meaningful PKs are created.
+                    </p></li></ul></div><p>
+        </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re-relationships-loading-control.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part4.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="configuration-properties.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;21.&nbsp;Other Settings&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Appendix&nbsp;A.&nbsp;Configuration Properties</td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-relationships-loading-control.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-relationships-loading-control.html (added)
+++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/re-relationships-loading-control.html Wed Dec 14 13:22:24 2016
@@ -0,0 +1,39 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+   <title xmlns:d="http://docbook.org/ns/docbook">Chapter&nbsp;21.&nbsp;Other Settings</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 4.0 documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 4.0"><link rel="home" href="index.html" title="Cayenne Guide"><link rel="up" href="cayenne-guide-part4.html" title="Part&nbsp;IV.&nbsp;DB-First Flow"><link rel="prev" href="re-filtering.html" title="Chapter&nbsp;20.&nbsp;Filtering"><link rel="next" href="re-modeler.html" title="Chapter&nbsp;22.&nbsp;Reverse Engineering in Cayenne Modeler"><script xmlns:d="http://docbook.org/ns/docbook" type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-7036673-1']);
+  _gaq.push(['_trackPageview']);
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+        </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.4.0 (4.0.M5-SNAPSHOT)</th><th align="center">Chapter&nbsp;21.&nbsp;Other Settings</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re-filtering.html">Prev</a>&nbsp;</td><th width="60%" align="center"><a accesskey="u" href="cayenne-guide-part4.html">Part&nbsp;IV.&nbsp;DB-First Flow</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="re-modeler.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="re-relationships-loading-control"></a>Chapter&nbsp;21.&nbsp;Other Settings</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="re-relationships-loading-control.html#skip-rel
 ationships-loading">Skip Relationships Loading</a></span></dt><dt><span class="section"><a href="re-relationships-loading-control.html#skip-pk-loading">Skip Primary Keys Loading</a></span></dt><dt><span class="section"><a href="re-relationships-loading-control.html#d0e3332">Table Types</a></span></dt></dl></div><p>
+        In databases relations are defined via foreign keys and there are a lot of different politics according to the level of relationships and 
+        ways how those relationships could be modeled in database. Anyway, cdbimport is able to recognize basic patterns of relationships, such as
+        OneToMany, OneToOne and ManyToMany. 
+    </p><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="skip-relationships-loading"></a>Skip Relationships Loading</h2></div></div></div><p>
+            You are able to skip relationships loading by the <code class="code">&lt;skipRelationshipsLoading&gt;</code> element.
+        </p><pre class="programlisting">
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;skipRelationshipsLoading&gt;</span>true<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;skipRelationshipsLoading&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span></pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="skip-pk-loading"></a>Skip Primary Keys Loading</h2></div></div></div><p>
+            Another useful Cayenne reverse engineering property is <code class="code">&lt;skipPrimaryKeyLoading&gt;</code>. If you decide to support all relationships at the application layer
+            and avoid their management in database, you&#8217;ll find useful to turn off primary keys synchronization at all.
+        </p><pre class="programlisting">
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;skipPrimaryKeyLoading&gt;</span>true<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;skipPrimaryKeyLoading&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span></pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="d0e3332"></a>Table Types</h2></div></div></div><p>By default, cdbimport imports tables and views. Some databases may support other
+            table-like objects, e.g. <code class="code">SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS,
+                SYNONYM</code>, etc. To control which types should be included <code class="code">&lt;tableType&gt;&lt;/tableType&gt;</code> element is used. Some examples:</p><p> Import tables only (skip views and others and other
+            types):</p><pre class="programlisting">
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;tableType&gt;</span>TABLE<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/tableType&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span></pre><p>
+        </p><p> Tables and views (<span class="emphasis"><em>the default
+            option</em></span>):</p><pre class="programlisting">
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;tableType&gt;</span>TABLE<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/tableType&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;tableType&gt;</span>VIEWS<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/tableType&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span></pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re-filtering.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="cayenne-guide-part4.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="re-modeler.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;20.&nbsp;Filtering&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;22.&nbsp;Reverse Engineering in Cayenne Modeler</td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/staging/cayenne/trunk/content/docs/4.0/tutorial-reverse-engineering/ch01.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/4.0/tutorial-reverse-engineering/ch01.html (added)
+++ websites/staging/cayenne/trunk/content/docs/4.0/tutorial-reverse-engineering/ch01.html Wed Dec 14 13:22:24 2016
@@ -0,0 +1,244 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+   <title xmlns:d="http://docbook.org/ns/docbook">Chapter&nbsp;1.&nbsp;Introduction and Basic Usage</title><link rel="stylesheet" type="text/css" href="css/cayenne-doc.css"><meta xmlns:d="http://docbook.org/ns/docbook" name="keywords" content="Cayenne 4.0 documentation"><meta xmlns:d="http://docbook.org/ns/docbook" name="description" content="User documentation for Apache Cayenne version 4.0"><link rel="home" href="index.html" title="Getting Started with Cayenne Reverse Engineering"><link rel="up" href="index.html" title="Getting Started with Cayenne Reverse Engineering"><link rel="prev" href="index.html" title="Getting Started with Cayenne Reverse Engineering"><link rel="next" href="ch02.html" title="Chapter&nbsp;2.&nbsp;A few hands-on examples"><script xmlns:d="http://docbook.org/ns/docbook" type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-7036673-1']);
+  _gaq.push(['_trackPageview']);
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+        </script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:d="http://docbook.org/ns/docbook" class="navheader"><table width="100%" summary="Navigation header"><tr><th class="versioninfo">v.4.0 (4.0.M4-SNAPSHOT)</th><th align="center">Chapter&nbsp;1.&nbsp;Introduction and Basic Usage</th><th></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="d0e20"></a>Chapter&nbsp;1.&nbsp;Introduction and Basic Usage</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="ch01.html#introduction">Introduction</a></span></dt><dt><span class="section"><a href="ch01.html#basic-usage">Basic Usage</a></span></dt></
 dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="introduction"></a>Introduction</h2></div></div></div><p>In Java development there is a well known problem about synchronization Java domain
+            model and relationship model in database. Let&#8217;s assume you are working on one of
+            a shopping application, some of your domain model classes would be Product, Order,
+            Shopping Cart and Customer. Considering the above sentence, we have a Java class and database
+            table name called &#8220;Customer&#8221;.</p><p>Java Class:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> Customer {
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">private</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">int</span> id;
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">private</span> String name;
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> Customer(){
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// to do your instance initialization stuff here</span>
+    }
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span>  Customer(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">int</span> id,String name){
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">this</span>.id = id;
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">this</span>.name = name;
+    }
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// getter and setter method goes here</span>
+
+}</pre><p>Database:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">CREATE</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">TABLE</span> `customer` (
+`id` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">INT</span>(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">11</span>) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NOT</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NULL</span>,
+`<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">name</span>` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">VARCHAR</span>(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">45</span>) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">DEFAULT</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NULL</span>,
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">PRIMARY</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">KEY</span> (`id`));</pre><p>
+            <span class="inlinemediaobject"><img src="images/customer1.png"></span>
+        </p><p>Let&#8217;s assume you have to split Customer model &#8220;name&#8221; field as First name and Last Name
+            due to the client requirement. In that case you have to update both Java class and table model manually.
+        </p><p>Java Class:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">class</span> Customer {
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">private</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">int</span> id;
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">private</span> String firstname;
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">private</span> String lastname;
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span> Customer(){
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// to do your instance initialization stuff here</span>
+    }
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">public</span>  Customer(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">int</span> id,String fname,String lname){
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">this</span>.id = id;
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">this</span>.firstname = fname;
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">this</span>.lastname = lname;
+    }
+
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">// getter and setter method goes here</span>
+}</pre><p>Database:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">CREATE</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">TABLE</span> `customer` (
+`id` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">INT</span>(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">11</span>) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NOT</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NULL</span>,
+`firstname` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">VARCHAR</span>(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">45</span>) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">DEFAULT</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NULL</span>,
+`lastname` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">VARCHAR</span>(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">45</span>) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">DEFAULT</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NULL</span>,
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">PRIMARY</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">KEY</span> (`id`));</pre><p>
+            <span class="inlinemediaobject"><img src="images/customer2.png"></span>
+        </p><p>
+            In the above example, synchronization of domain model and database relationship model is manually
+            updated by Java developers. In this situation we have to keep both copies of Java classes and
+            database tables up to date manually. If you change something in db, that changes should be reflected
+            in Java classes. Likewise all Java classes changes should be reflected in database.
+            Although it can be automated manually, it will take some cost of time.
+        </p><p>
+            However, Cayenne automates this process with a minimum cost of time. It has two options for this automation process:
+            </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Forward Engineering  - Generating db schema according to the Java classes.</p></li><li class="listitem"><p>Reverse Engineering - Updating Java classes according to the database schema.</p></li></ul></div><p>
+
+            The reverse engineering tool is called CDBImport.
+        </p></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="basic-usage"></a>Basic Usage</h2></div></div></div><p>
+            CDBImport is a Maven/Ant plugin that helps you to do reverse engineering. In other words it helps you to synchronize
+            database structure with your Cayenne mapping config. It does not update Java classes by itself, but it synchronizes db
+            and data access layer representation in Cayenne mapping file with actual database state.
+            Most common practice to complete reverse engineering is to use CDBImport followed by CGen Maven plugin,
+            which does class generation according to the Cayenne mapping file updates.
+        </p><p>
+            You could use CDBImport Maven plugin by declaring and configuring it in your pom.xml.
+            See an example with comments below:
+        </p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;profile&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Here we define a profile with cdbimport and cgen configurations.
+    For sure you could define all plugins in general build section, but it will be time consuming
+    during each build to load database structure and check it for changes. Also, you will probably want to
+    control when exactly reverse engineering happens in order to correct its results if necessary. --&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;id&gt;</span>ormsync<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/id&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;build&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;plugins&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;plugin&gt;</span>
+                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;groupId&gt;</span>org.apache.cayenne.plugins<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/groupId&gt;</span>
+                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;artifactId&gt;</span>maven-cayenne-plugin<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/artifactId&gt;</span>
+                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;version&gt;</span>4.0.M4-SNAPSHOT<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/version&gt;</span>
+                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;executions&gt;</span>
+                    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;execution&gt;</span>
+                        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;id&gt;</span>ormsync<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/id&gt;</span>
+                        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;goals&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Again, cdbimport is a part of reverse engineering process.
+                            Next step is generating Java classes according to their mapping by cgen. --&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;goal&gt;</span>cdbimport<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/goal&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;goal&gt;</span>cgen<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/goal&gt;</span>
+                        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/goals&gt;</span>
+                        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;configuration&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- At first, we have to define database connection information
+                            from which the structure will be loaded. --&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;driver&gt;</span>com.mysql.jdbc.Driver<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/driver&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;url&gt;</span>jdbc:mysql://127.0.0.1:3306/test<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/url&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;username&gt;</span>root<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/username&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!--&lt;password&gt;password&lt;/password&gt;--&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Next step is to define mapping file, which we are going to use.
+                            If it doesn't exist, it will be created automatically after the first plugin execution.
+                            Here you could also define some mapping properties. It isn't necessary for cdbimport task, but it will be used by cgen. --&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;map&gt;</span>${project.basedir}/src/main/resources/shopping.map.xml<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/map&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;defaultPackage&gt;</span>org.apache.cayenne.shopping<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/defaultPackage&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;superPkg&gt;</span>org.apache.cayenne.shopping.auto<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/superPkg&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Last part of configuration is reverse engineering tuning.
+                            Here we just define which catalogs we want to process and which tables should be excluded.
+                            You could find detailed description of possible configurations in the </span><a class="link" href="http://cayenne.apache.org/docs/4.0/cayenne-guide/including-cayenne-in-project.html#mvn-cdbimport" target="_top">documentation</a>. --&gt;
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;reverseEngineering&gt;</span>
+                                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;catalog&gt;</span>
+                                    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;name&gt;</span>test<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/name&gt;</span>
+                                    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeTable&gt;</span>system_patch<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeTable&gt;</span>
+                                    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeTable&gt;</span>v_*<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeTable&gt;</span>
+                                    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;excludeTable&gt;</span>*_view<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/excludeTable&gt;</span>
+                                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/catalog&gt;</span>
+                            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/reverseEngineering&gt;</span>
+                        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/configuration&gt;</span>
+                    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/execution&gt;</span>
+                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/executions&gt;</span>
+                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;dependencies&gt;</span>
+                    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-comment">&lt;!-- Also, you have to add JDBC driver dependency. --&gt;</span>
+                    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;dependency&gt;</span>
+                        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;groupId&gt;</span>mysql<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/groupId&gt;</span>
+                        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;artifactId&gt;</span>mysql-connector-java<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/artifactId&gt;</span>
+                        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;version&gt;</span>5.1.28<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/version&gt;</span>
+                    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/dependency&gt;</span>
+                <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/dependencies&gt;</span>
+            <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/plugin&gt;</span>
+        <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/plugins&gt;</span>
+    <span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/build&gt;</span>
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-tag">&lt;/profile&gt;</span></pre><p>
+            Let&#8217;s consider that shopping application consists of the following tables and relationships in database.
+            Initially, we are going to take customer, order tables and one foreign key relationship between them.
+        </p><p>Database:</p><pre class="programlisting"><span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">CREATE</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">TABLE</span> `customer` (
+`id` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">INT</span>(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">11</span>) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NOT</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NULL</span>,
+`<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">name</span>` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">VARCHAR</span>(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">50</span>) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">DEFAULT</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NULL</span>,
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">PRIMARY</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">KEY</span> (`id`));
+
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">CREATE</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">TABLE</span> `<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">order</span>` (
+`id` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">INT</span>(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">11</span>) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NOT</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NULL</span>,
+`amount` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">DECIMAL</span>(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">6</span>,<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">2</span>) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">DEFAULT</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NULL</span>,
+`customer_id` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">INT</span>(<span xmlns="http://www.w3.org/1999/xhtml" class="hl-number">11</span>) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">DEFAULT</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">NULL</span>,
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">PRIMARY</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">KEY</span> (`id`),
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">KEY</span> `fk_customers_id_idx` (`customer_id`),
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">CONSTRAINT</span> `fk_customers_id_refference` <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">FOREIGN</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">KEY</span> (`customer_id`) <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">REFERENCES</span> `customer` (`id`)
+<span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">ON</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">DELETE</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">CASCADE</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">ON</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">UPDATE</span> <span xmlns="http://www.w3.org/1999/xhtml" class="hl-keyword">CASCADE</span>);</pre><p>
+            <span class="inlinemediaobject"><img src="images/customer-order.png"></span>
+        </p><p>
+            Now, please arrange the profile above for your custom DB settings. That&#8217;s all you need to do for reverse
+            engineering with Cayenne. Now you are able to run the reverse engineering task as described below.
+        </p><pre class="screen"><code class="prompt">$</code> mvn compile -Pormsync</pre><p>The output should look like this:</p><pre class="screen">[INFO] Scanning for projects...
+[INFO]
+[INFO] ------------------------------------------------------------------------
+[INFO] Building MySQLTest 0.0.1-SNAPSHOT
+[INFO] ------------------------------------------------------------------------
+[INFO]
+[INFO] --- maven-cayenne-plugin:4.0.M3:cdbimport (ormsync) @ MySQLTest ---
+Aug 16, 2016 3:36:41 PM org.apache.cayenne.datasource.DriverDataSource logConnect
+INFO: Connecting to 'jdbc:mysql://127.0.0.1:3306/test' as 'root'
+Aug 16, 2016 3:36:41 PM org.apache.cayenne.datasource.DriverDataSource getConnection
+INFO: +++ Connecting: SUCCESS.
+Aug 16, 2016 3:36:41 PM org.apache.cayenne.log.CommonsJdbcEventLogger log
+INFO: Detected and installed adapter: org.apache.cayenne.dba.mysql.MySQLAdapter
+Aug 16, 2016 3:36:41 PM org.apache.cayenne.datasource.DriverDataSource logConnect
+INFO: Connecting to 'jdbc:mysql://127.0.0.1:3306/test' as 'root'
+Aug 16, 2016 3:36:41 PM org.apache.cayenne.datasource.DriverDataSource getConnection
+INFO: +++ Connecting: SUCCESS.
+Aug 16, 2016 3:36:41 PM org.apache.cayenne.access.DbLoader load
+INFO: Schema loading...
+Aug 16, 2016 3:36:41 PM org.apache.cayenne.datasource.DriverDataSource logConnect
+INFO: Connecting to 'jdbc:mysql://127.0.0.1:3306/test' as 'root'
+Aug 16, 2016 3:36:41 PM org.apache.cayenne.datasource.DriverDataSource getConnection
+INFO: +++ Connecting: SUCCESS.
+Aug 16, 2016 3:36:41 PM org.apache.cayenne.log.CommonsJdbcEventLogger log
+INFO: Detected and installed adapter: org.apache.cayenne.dba.mysql.MySQLAdapter
+[INFO]   Table: test.customer
+[INFO]   Table: test.order
+[INFO]     Db Relationship : toOne  (order.customer_id, customer.id)
+[INFO]     Db Relationship : toMany (customer.id, order.customer_id)
+[INFO]
+[INFO] Map file does not exist. Loaded db model will be saved into '**/MySQLTest/src/main/resources/shopping.map.xml'
+[INFO]
+[INFO] --- maven-cayenne-plugin:4.0.M3:cgen (ormsync) @ MySQLTest ---
+[INFO] Generating superclass file: **/MySQLTest/src/main/java/org/apache/cayenne/shopping/auto/_Customer.java
+[INFO] Generating class file:**/MySQLTest/src/main/java/org/apache/cayenne/shopping/Customer.java
+[INFO] Generating superclass file: **/MySQLTest/src/main/java/org/apache/cayenne/shopping/auto/_Order.java
+[INFO] Generating class file: **/MySQLTest/src/main/java/org/apache/cayenne/shopping/Order.java
+[INFO]</pre><p>
+            Above output demonstrates what was loaded from database (test.order, test.customer tables and customer_id relationships)
+            by cdbimport task and which classes was generated by cgen task.
+        </p><p>
+            In the example we assume that you don't have a mapping file. But if you have, it will contain the relationship between
+            Java class and database table. Note that if there is no mapping file, Cayenne will generate it automatically and store it
+            under the resource folder specified by &lt;map&gt; property.
+        </p><p>
+            Notice that cdbimport updates only one file in your source code: mapping file that you pointed in &lt;map&gt; maven option.
+            If you do reverse engineering again (mvn compile -Pormsync), plug-in will load all information from database but say that
+            no changes are detected. On the other hand, cgen task will regenerate superclasses (_Customer.java, _Order.java),
+            but not subclasses (Customer.java, Order.java).
+        </p><p>Console will provide the following output:</p><pre class="screen">[INFO] Scanning for projects...
+[INFO]
+[INFO] ------------------------------------------------------------------------
+[INFO] Building MySQLTest 0.0.1-SNAPSHOT
+[INFO] ------------------------------------------------------------------------
+[INFO]
+[INFO] --- maven-cayenne-plugin:4.0.M3:cdbimport (ormsync) @ MySQLTest ---
+Aug 16, 2016 4:44:33 PM org.apache.cayenne.datasource.DriverDataSource logConnect
+INFO: Connecting to 'jdbc:mysql://127.0.0.1:3306/test' as 'root'
+Aug 16, 2016 4:44:33 PM org.apache.cayenne.datasource.DriverDataSource getConnection
+INFO: +++ Connecting: SUCCESS.
+Aug 16, 2016 4:44:33 PM org.apache.cayenne.log.CommonsJdbcEventLogger log
+INFO: Detected and installed adapter: org.apache.cayenne.dba.mysql.MySQLAdapter
+Aug 16, 2016 4:44:33 PM org.apache.cayenne.datasource.DriverDataSource logConnect
+INFO: Connecting to 'jdbc:mysql://127.0.0.1:3306/test' as 'root'
+Aug 16, 2016 4:44:33 PM org.apache.cayenne.datasource.DriverDataSource getConnection
+INFO: +++ Connecting: SUCCESS.
+Aug 16, 2016 4:44:33 PM org.apache.cayenne.access.DbLoader load
+INFO: Schema loading...
+Aug 16, 2016 4:44:33 PM org.apache.cayenne.datasource.DriverDataSource logConnect
+INFO: Connecting to 'jdbc:mysql://127.0.0.1:3306/test' as 'root'
+Aug 16, 2016 4:44:34 PM org.apache.cayenne.datasource.DriverDataSource getConnection
+INFO: +++ Connecting: SUCCESS.
+Aug 16, 2016 4:44:34 PM org.apache.cayenne.log.CommonsJdbcEventLogger log
+INFO: Detected and installed adapter: org.apache.cayenne.dba.mysql.MySQLAdapter
+[INFO]   Table: test.customer
+[INFO]   Table: test.order
+[INFO]     Db Relationship : toOne  (order.customer_id, customer.id)
+[INFO]     Db Relationship : toMany (customer.id, order.customer_id)
+[INFO]
+[INFO] Detected changes: No changes to import.
+[INFO]
+[INFO] --- maven-cayenne-plugin:4.0.M3:cgen (ormsync) @ MySQLTest ---
+[INFO] Generating superclass file: **/MySQLTest/src/main/java/org/apache/cayenne/shopping/auto/_Customer.java
+[INFO] Generating superclass file: **/MySQLTest/src/main/java/org/apache/cayenne/shopping/auto/_Order.java
+[INFO]</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Getting Started with Cayenne Reverse Engineering&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;2.&nbsp;A few hands-on examples</td></tr></table></div></body></html>
\ No newline at end of file