db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak" <tom...@gmail.com>
Subject Re: excludetables problem and have a fix
Date Fri, 28 Nov 2008 23:21:31 GMT
Hi Heng,

please file an issue with DdlUtils JIRA
(http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10731) for
this. If you have a patch or unit tests for this, please also attach
them to the JIRA issue.


On Wed, Nov 26, 2008 at 8:30 AM, Heng Chu <hengchu@hotmail.com> wrote:
> First of all, thanks for this wonderful utility. Very useful w/ a lot of good
> features. I recently found a problem in ddlutils (latest code in SVN) and
> have a fix. I am not sure how I can contribute the fix back to the DdlUtils
> project team.
> Here is the problem: I use excludetables in the DdlUtils Ant task
> org.apache.ddlutils.task.DatabaseToDdlTask. Some of the tables listed have
> foreigh keys to other tables in the DB. I got an error on writeSchemaToFile
> complaining about this which should be ok.
> Here is the fix: In org.apache.ddlutils.task.DatabaseToDdlTask, the
> readModel() method calls the
> ModelHelper.checkForForeignKeysToAndFromTables() in both the exclude and
> include cases. That method, as currently implemented, throws an exception if
> (1) a table in the (exclude or include) list has a foreign key to a table
> not on the list, OR, (2) a table not on the list has a foreign key into a
> table in the (exclude or include) list. This is too strict a check and could
> stop some legit cases -- my problem is actually due to chec (1) which is ok
> in exclude case. This method should be split into two. For the include case,
> just check (1) and for excluse case, just check (2). I made the
> straightfoward change in my local copy and things went ok. I just want to
> report this and hope it's fixed in the near future. Thanks!
> Heng
> --
> View this message in context: http://www.nabble.com/excludetables-problem-and-have-a-fix-tp20704354p20704354.html
> Sent from the Apache DdlUtils - User mailing list archive at Nabble.com.

View raw message