FAQ
Currently all screenshots of modeler are done in OS X. I don't have Mac, so
could someone update the second screenshot on this page?

2008/11/20, confluence@apache.org <confluence@apache.org>:
Page Edited : CAYDOC <http://cwiki.apache.org/confluence/display/CAYDOC> :
Reverse Engineer Database<http://cwiki.apache.org/confluence/display/CAYDOC/Reverse+Engineer+Database>

Reverse Engineer Database<http://cwiki.apache.org/confluence/display/CAYDOC/Reverse+Engineer+Database>has been edited by Andrey
Razumosky <http://cwiki.apache.org/confluence/display/~andrey> (Nov 20,
2008).

(View changes)<http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=10662&originalVersion=3&revisedVersion=4>
Content:
Reverse Engineer Database

*Start Reverse Engineering.* To reverse engineer a database you need to
select either a DataDomain or one of its children on the project tree. Then
select "Tools > Reengineer Database Schema" from the menu. "Connect to
Database" dialog will be presented.
Reverse-engineering behavior is sensitive to the current project tree
selection. If you selected a DataDomain or a DataNode, a new DataMap will be
created and all reengineered tables will be put in this DataMap. If you had
an existing DataMap (or one of its entities) selected when you started
reverse engineering, new tables will be merged into the existing DataMap.

*Configure Database Connection.* "Connect to Database" dialog allows to
specify alternative connection parameters. If a DataNode was selected when
reverse engineering started, its connection information is shown by default.
You can use suggested default connection, select one of the stored local
DataSources from "Saved DataSources" dropdown (those can be edited on the
spot by clicking "..." button), or type your own info. When desired
connection is selected, click "Continue". Cayenne will attempt to connect to
the database and if connection is successful, "Select Options" dialog is
presented.

*Configure Options.* "Select Options" dialog allows to specify what needs
to be reverse engineered. If a database supports schemas, one of the listed
schemas should be selected. Table and stored procedure patterns allow to
control which tables/procedures are included in reverse engineering.
Patterns should be in the format used by SQL LIKE clause (e.g. "ABC", "ABC%"
or" %" or "A%T", etc.).

*Naming strategies.* Since Cayenne 3.0 you can obtain control over
DbRelationship, ObjEntity, ObjAttribute and ObjRelationship names
generation. This is achieved by implementing
org.apache.cayenne.access.reveng.NamingStrategy interface. Modeler itself is
distrubuted with two default strategies.

org.apache.cayenne.access.reveng.BasicNamingStrategy generates names in
Cayenne 2.0-style. Thus, to-one relationships will be prefixed by "to",
to-many relationships will be postfixed by 'Array'. Examples of such names
are "toArtist" and "paintingArray".

org.apache.cayenne.modeler.util.SmartNamingStrategy uses FK column names
for to-one relationship names (e.g. if FK column is called "ARTIST_ID" or
"ARTISTID" the relationship's name will be just "artist"). To-many
relationship names are pluralized forms of other-side entities names, e.g.
"paintings". Pluralization is done in rules of English language using
Inflector <https://inflector.dev.java.net/>.

To use one of predefined strategies or your own one you must specify
strategy class name in "Naming Stragegy" field of "Select Options" dialog.
JAR with user strategy must be attached using Tools->Preferences->ClassPath
bookmark. NamingStrategy implementation must have a public default
constructor.

*Running Reverse Engineering.* After desired options are selected, click
"Continue". Progress dialog will open. It will close automatically when
reverse-engineering is done. After that all database tables and stored
procedures that matched selected criteria will be added to the DataMap.
Default ObjEntity mapping will be created as well.


TODO: Change the screenshot.

Powered by Atlassian Confluence<http://www.atlassian.com/software/confluence/default.jsp?clicked=footer>(Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature
request <http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470>

Unsubscribe or edit your notifications preferences<http://cwiki.apache.org/confluence/users/viewnotifications.action>

Search Discussions

  • Michael Gentry at Nov 21, 2008 at 7:23 pm
    I'll try to do this over the weekend. If someone beats me to it, just
    drop a note here.

    Thanks!


    On Thu, Nov 20, 2008 at 1:14 PM, Andrey Razumovsky
    wrote:
    Currently all screenshots of modeler are done in OS X. I don't have Mac, so
    could someone update the second screenshot on this page?

    2008/11/20, confluence@apache.org <confluence@apache.org>:
    Page Edited : CAYDOC <http://cwiki.apache.org/confluence/display/CAYDOC> :
    Reverse Engineer Database<http://cwiki.apache.org/confluence/display/CAYDOC/Reverse+Engineer+Database>

    Reverse Engineer Database<http://cwiki.apache.org/confluence/display/CAYDOC/Reverse+Engineer+Database>has been edited by Andrey
    Razumosky <http://cwiki.apache.org/confluence/display/~andrey> (Nov 20,
    2008).

    (View changes)<http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=10662&originalVersion=3&revisedVersion=4>
    Content:
    Reverse Engineer Database

    *Start Reverse Engineering.* To reverse engineer a database you need to
    select either a DataDomain or one of its children on the project tree. Then
    select "Tools > Reengineer Database Schema" from the menu. "Connect to
    Database" dialog will be presented.
    Reverse-engineering behavior is sensitive to the current project tree
    selection. If you selected a DataDomain or a DataNode, a new DataMap will be
    created and all reengineered tables will be put in this DataMap. If you had
    an existing DataMap (or one of its entities) selected when you started
    reverse engineering, new tables will be merged into the existing DataMap.

    *Configure Database Connection.* "Connect to Database" dialog allows to
    specify alternative connection parameters. If a DataNode was selected when
    reverse engineering started, its connection information is shown by default.
    You can use suggested default connection, select one of the stored local
    DataSources from "Saved DataSources" dropdown (those can be edited on the
    spot by clicking "..." button), or type your own info. When desired
    connection is selected, click "Continue". Cayenne will attempt to connect to
    the database and if connection is successful, "Select Options" dialog is
    presented.

    *Configure Options.* "Select Options" dialog allows to specify what needs
    to be reverse engineered. If a database supports schemas, one of the listed
    schemas should be selected. Table and stored procedure patterns allow to
    control which tables/procedures are included in reverse engineering.
    Patterns should be in the format used by SQL LIKE clause (e.g. "ABC", "ABC%"
    or" %" or "A%T", etc.).

    *Naming strategies.* Since Cayenne 3.0 you can obtain control over
    DbRelationship, ObjEntity, ObjAttribute and ObjRelationship names
    generation. This is achieved by implementing
    org.apache.cayenne.access.reveng.NamingStrategy interface. Modeler itself is
    distrubuted with two default strategies.

    org.apache.cayenne.access.reveng.BasicNamingStrategy generates names in
    Cayenne 2.0-style. Thus, to-one relationships will be prefixed by "to",
    to-many relationships will be postfixed by 'Array'. Examples of such names
    are "toArtist" and "paintingArray".

    org.apache.cayenne.modeler.util.SmartNamingStrategy uses FK column names
    for to-one relationship names (e.g. if FK column is called "ARTIST_ID" or
    "ARTISTID" the relationship's name will be just "artist"). To-many
    relationship names are pluralized forms of other-side entities names, e.g.
    "paintings". Pluralization is done in rules of English language using
    Inflector <https://inflector.dev.java.net/>.

    To use one of predefined strategies or your own one you must specify
    strategy class name in "Naming Stragegy" field of "Select Options" dialog.
    JAR with user strategy must be attached using Tools->Preferences->ClassPath
    bookmark. NamingStrategy implementation must have a public default
    constructor.

    *Running Reverse Engineering.* After desired options are selected, click
    "Continue". Progress dialog will open. It will close automatically when
    reverse-engineering is done. After that all database tables and stored
    procedures that matched selected criteria will be added to the DataMap.
    Default ObjEntity mapping will be created as well.


    TODO: Change the screenshot.

    Powered by Atlassian Confluence<http://www.atlassian.com/software/confluence/default.jsp?clicked=footer>(Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature
    request <http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470>

    Unsubscribe or edit your notifications preferences<http://cwiki.apache.org/confluence/users/viewnotifications.action>
  • Michael Gentry at Nov 22, 2008 at 3:50 pm
    Should be updated now. I switched from JPG to PNG, too, so the image
    should look a bit better.

    For OS X users wanting to do screenshots, I use a utility called
    SnapNDrag (http://www.yellowmug.com/snapndrag/) which is easier to use
    than the Apple-supplied Grab.app (my opinion), plus allows you to save
    as PNG.

    On Fri, Nov 21, 2008 at 2:22 PM, Michael Gentry wrote:
    I'll try to do this over the weekend. If someone beats me to it, just
    drop a note here.

    Thanks!
  • Robert Zeigler at Nov 22, 2008 at 3:58 pm
    Hm. I've always just used the keyboard shortcuts for screenshots, like
    command-shift-4 (for selecting a region of the screen). That drops a
    png image onto the desktop.
    I'll have to check out SnapNDrag.

    Robert
    On Nov 22, 2008, at 11/229:49 AM , Michael Gentry wrote:

    Should be updated now. I switched from JPG to PNG, too, so the image
    should look a bit better.

    For OS X users wanting to do screenshots, I use a utility called
    SnapNDrag (http://www.yellowmug.com/snapndrag/) which is easier to use
    than the Apple-supplied Grab.app (my opinion), plus allows you to save
    as PNG.


    On Fri, Nov 21, 2008 at 2:22 PM, Michael Gentry
    wrote:
    I'll try to do this over the weekend. If someone beats me to it,
    just
    drop a note here.

    Thanks!
  • Michael Gentry at Nov 22, 2008 at 10:02 pm
    The keyboard shortcuts used to make TIFF files, but perhaps that has
    changed now. If so, that's one move in the right direction.

    On Sat, Nov 22, 2008 at 10:57 AM, Robert Zeigler
    wrote:
    Hm. I've always just used the keyboard shortcuts for screenshots, like
    command-shift-4 (for selecting a region of the screen). That drops a png
    image onto the desktop.
    I'll have to check out SnapNDrag.

    Robert
  • Andrey Razumovsky at Nov 23, 2008 at 8:25 am
    Thanks! As I said, I've no access to Mac, so probably I'll have to ask for
    that again in the future :-)

    2008/11/22, Michael Gentry <blacknext@gmail.com>:
    Should be updated now. I switched from JPG to PNG, too, so the image
    should look a bit better.

    For OS X users wanting to do screenshots, I use a utility called
    SnapNDrag (http://www.yellowmug.com/snapndrag/) which is easier to use
    than the Apple-supplied Grab.app (my opinion), plus allows you to save
    as PNG.


    On Fri, Nov 21, 2008 at 2:22 PM, Michael Gentry wrote:
    I'll try to do this over the weekend. If someone beats me to it, just
    drop a note here.

    Thanks!
  • Aristedes Maniatis at Nov 23, 2008 at 9:16 am

    On 23/11/2008, at 7:24 PM, Andrey Razumovsky wrote:

    Thanks! As I said, I've no access to Mac, so probably I'll have to
    ask for
    that again in the future :-)

    In my opinion, I'd prefer to see Windows screenshots mixed with OSX
    screenshots, even within the same page. That gives a better message to
    the user base about the cross platform usability of Cayenne.

    Ari


    -------------------------->
    ish
    http://www.ish.com.au
    Level 1, 30 Wilson Street Newtown 2042 Australia
    phone +61 2 9550 5001 fax +61 2 9550 4001
    GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
  • Michael Gentry at Nov 23, 2008 at 2:56 pm
    I was thinking that the other day, too. Or at least on the modeler
    front-page, have screenshots of OS X, Windows, and maybe Linux to show
    it is cross-platform.

    On Sun, Nov 23, 2008 at 4:15 AM, Aristedes Maniatis wrote:
    In my opinion, I'd prefer to see Windows screenshots mixed with OSX
    screenshots, even within the same page. That gives a better message to the
    user base about the cross platform usability of Cayenne.
  • Michael Gentry at Nov 23, 2008 at 2:57 pm
    Perhaps:

    http://cayenne.apache.org/doc/modeler-guide.html

    or

    http://cayenne.apache.org/doc/introduction-to-cayennemodeler.html

    On Sun, Nov 23, 2008 at 9:55 AM, Michael Gentry wrote:
    I was thinking that the other day, too. Or at least on the modeler
    front-page, have screenshots of OS X, Windows, and maybe Linux to show
    it is cross-platform.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedNov 20, '08 at 6:15p
activeNov 23, '08 at 2:57p
posts9
users4
websitecayenne.apache.org

People

Translate

site design / logo © 2022 Grokbase