Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-244

Error DDLUtils 1.0 - mapping.xml - foerign keys, indicies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0
    • None
    • None
    • Win XP, Java SDK 6 update 12

    Description

      If I created a database schema based on database.dtd schema and I defined for the database also unique and foreign keys, I got an errors during the creation of database (Database.readDatabaseFromXML() method) saying that the column <name of key> doesn't have a type.

      I found that the issue was in the mapping.xml file - there was missing a mmapping for uniquie and foreign keys in the element <table>. I added the missing mapping and now I can create a DB from xml file including foregein and unique keys.

      After fixing mapping in XML I had to also fix also class org.apache.ddlutils.model.Table by adding two new methods

      public void addNonUniqueIndex(NonUniqueIndex index)

      { addIndex(index); }

      public void addUniqueIndex(UniqueIndex index)

      { addIndex(index); }

      With common method addIndex(Index idx) it didn't work too. Propbaly problem that Index is only interface not class.

      Attachments

        1. Table.java
          22 kB
          Mitko Mitev
        2. mapping.xml
          4 kB
          Mitko Mitev

        Activity

          People

            tomdz Thomas Dudziak
            mitko-mitev Mitko Mitev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified