[ 
http://issues.apache.org/jira/browse/TORQUE-39?page=comments#action_12421708 ] 
            
CG Monroe commented on TORQUE-39:
---------------------------------

A couple of things to keep in mind about this.

First, the database tag name attribute is a Torque id and not actually tied to 
any physical DB.  For example, I have multiple Torque schema files for tables 
that all exist in the same physical DB but are used by subsections of my code.  

Second, IMHO the schema files generated via JDBC should be considered a 
starting point for creating production ready files.  There is just too many 
options that JDBC can know nothing about such as idmethod, java naming methods, 
inheritance, and the like.  So the generated files will always need some hand 
tweaking to be right.

FWIW, I don't think there is a "right" answer to what goes in the generated 
name attribute.  I could make the argument that as an MSSQL user who can only 
create schema files by specifying the owner of the tables that the dbuser is 
the correct value to use.  Oracle users might claim they want the Oracle schema 
being mapped used.  Who's right?

Maybe the best solution is to just used a static value like "jdbc-generated"?  
Perhaps this should be a new property in the default.properties that can be 
overridden in the build.properties?

> Wrong database name in generated XML schema with jdbc task
> ----------------------------------------------------------
>
>                 Key: TORQUE-39
>                 URL: http://issues.apache.org/jira/browse/TORQUE-39
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.2
>            Reporter: Thoralf Rickert
>
> In org.apache.torque.task.TorqueJDBCTransformTask#generateXML() is a bug in 
> line 196.
> 195:            databaseNode = doc.createElement("database");
> 196:            databaseNode.setAttribute("name", dbUser);
> This would generate a wrong XML schema <database name="dbUser"> instead of 
> <database name="databaseName">...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to