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: Why are tables in a database ordered?
Date Thu, 03 Aug 2006 04:26:58 GMT
On 8/2/06, Alex Funk <alex@alexfunk.de> wrote:

> I used DdlUtils to compare an existing Derby database model with a
> specification xml, and 'Database#equal' returned false, although they
> are equal. The reason is - I think - that tables have a certain order in
> the 'Database' class, stored in an 'ArrayList'. The existing 'Database'
> from 'platform.readModelFromDatabase(...)' returns the tables in a
> different order than the 'Database' from 'DatabaseIO().read'.

They are returned in the order that the database returns them,
DdlUtils does nothing to that order. Likewise, reading form an XML
uses the order in the XML file.

> Is there a good reason for this, or is that considered a bug? Does that
> only happen with certain DBMS? Is there a workaround?

I could add an attribute to the Ant subtask for reading a model from a
live database that tells DdlUtils to sort the tables (alphabetically).
Please create an issue in JIRA if this would help you.


View raw message