db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Madhu Krishna (JIRA)" <j...@apache.org>
Subject [jira] Created: (DDLUTILS-229) writedatatofile Ant task not using the database model and retrieves all db objects ignoring the schema pattern
Date Thu, 30 Oct 2008 15:35:44 GMT
writedatatofile Ant task not using the database model and retrieves all db objects ignoring
the schema pattern
--------------------------------------------------------------------------------------------------------------

                 Key: DDLUTILS-229
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-229
             Project: DdlUtils
          Issue Type: Bug
          Components: Ant Tasks
    Affects Versions: 1.0
         Environment: Windows/Linux
            Reporter: Madhu Krishna
            Assignee: Thomas Dudziak



The database model <database> specified with schema pattern <databaseToDdl> is
never used in  <writedatatofile> Ant task code.
Instead, the whole database is read again ignoring the vital parameters like schemapattern
as below. (WriteDataToFileCommand.java - Line 88)

            getDataIO().writeDataToXML(getPlatform(),
                                       new FileOutputStream(_outputFile), _encoding);

This creates many problems in Oracle db by retrieving all user objects.


Suggested Fix: The database model should be passed invoking the right method as shown below
~~~~~~~~~~~~
public void execute(DatabaseTaskBase task, Database model) throws BuildException
    {
        try
        {
            //getDataIO().setDetermineSchema(_determineSchema);
            //getDataIO().setSchemaPattern(task.getPlatformConfiguration().getSchemaPattern());
            getDataIO().writeDataToXML(getPlatform(), model,
                                       new FileOutputStream(_outputFile), _encoding);
            _log.info("Written data XML to file" + _outputFile.getAbsolutePath());
        }
        catch (Exception ex)
        {
            handleException(ex, ex.getMessage());
        }
    }

-- 
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