empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Venditti (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] [Issue Comment Edited] (EMPIREDB-110) Add support for reverse-engineering of foreign-key relationships
Date Sat, 02 Jul 2011 16:28:23 GMT

    [ https://issues.apache.org/jira/browse/EMPIREDB-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059080#comment-13059080
] 

Benjamin Venditti edited comment on EMPIREDB-110 at 7/2/11 4:26 PM:
--------------------------------------------------------------------

committed the neccessary changes for the foreign-key relationships to be generated:
- querry the DatabaseMetaData for relations and populate the empire db model
- extended the database velocity template to generate the appropriate lines for table relations

      was (Author: benniven):
    comitted the neccessary changes for the foreign-key relationships to be generated:
- querry the DatabaseMetaData for relations and populate the empire db model
- extended the database velocity template to generate the appropriate lines for table relations
  
> 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
>
>
> 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

       

Mime
View raw message