db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Schindl <tomatli...@gmx.at>
Subject Re: Running Code Analyzer
Date Thu, 20 Apr 2006 22:01:04 GMT
Thomas Dudziak wrote:
> On 4/20/06, Tom Schindl <tomAtLinux@gmx.at> wrote:
>>yes I understand. Attached is the patch to the questionable missing
>>break which is when missining intentional strange and should at least be
> Thanks, is fixed in SVN
>>One more question I don't see any code that deals with the situations
>>where one changes e.g. the name of column/table, removes a column/table,
>>... which is referenced in indices, foreign keys, ... .
> I'm not exactly sure what you mean ?

Well suppose I'm writing a modelling tool based upon your Model-Classes
having created 2 tables and foreign key constraint. After that I see
that I have a typo in the name of the the foreign-key provider table, if
I now rename the table by setting setName() the ForgeinKey-Reference
doesn't get informed about this and as result the internal structure is

_foreignTableName != _foreignTable.getName()

if i would now write dump the the files to db.xml I could not load it
the next time.

The same applies when renaming columns ;-) I think all this situations
can be dealt with easily when adding PropertyChangeSupport to all model
classes and e.g. the foreignKey-Instance adds itself to the
PropertyChangeListeners and updates its _foreignTableName-Attribute when
the table name changes.


> Tom

View raw message