db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mitko Mitev (JIRA)" <j...@apache.org>
Subject [jira] Created: (DDLUTILS-244) Error DDLUtils 1.0 - mapping.xml - foerign keys, indicies
Date Thu, 26 Mar 2009 10:26:07 GMT
Error DDLUtils 1.0 - mapping.xml - foerign keys, indicies
---------------------------------------------------------

                 Key: DDLUTILS-244
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-244
             Project: DdlUtils
          Issue Type: Bug
          Components: Core (No specific database)
    Affects Versions: 1.0
         Environment: Win XP, Java SDK 6 update 12 
            Reporter: Mitko Mitev
            Assignee: Thomas Dudziak


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message