You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by "Matt DeHoust (JIRA)" <em...@incubator.apache.org> on 2011/07/04 20:44:21 UTC

[jira] [Updated] (EMPIREDB-110) Add support for reverse-engineering of foreign-key relationships

     [ https://issues.apache.org/jira/browse/EMPIREDB-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt DeHoust updated EMPIREDB-110:
----------------------------------

    Attachment: empire-db-codegen.CodeGenParserTest.patch.txt

This patch provides a unit test for reverse-engineering relationships.

> Add support for reverse-engineering of foreign-key relationships
> ----------------------------------------------------------------
>
>                 Key: EMPIREDB-110
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-110
>             Project: Empire-DB
>          Issue Type: New Feature
>          Components: CodeGenerator
>    Affects Versions: empire-db-2.2.0-incubating
>            Reporter: Rainer Döbele
>            Assignee: Benjamin Venditti
>             Fix For: empire-db-2.2.0-incubating
>
>         Attachments: empire-db-codegen.CodeGenParserTest.patch.txt
>
>
> Add support for reverse-engineering of foreign-key relationships by generating the corresponding source code.
> Reported and suggested by Matt DeHourst.
> Implementation hints provided by Benjamin Venditti:
>     CodeGenParser.populateDatabase(..) : 131 : This is the point where the DatabaseMetaData is querried and used to populate empire-db's model
>     CodeGenWriter.generateCodeFiles(..) : 125 : Is used to serialize the populated model as java code
>     src/main/resources/Database.vm :  70 : This is the velocity template we use to create the java class for the database. In its default constructor you'd need to add a line for each relationship similar to this:
>                                 addRelation( FKTABLE.FK_ID.referenceOn( SOURCE_TABLE.PK_ID ));

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira