You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thoralf Rickert (JIRA)" <ji...@apache.org> on 2006/07/11 15:45:29 UTC
[jira] Created: (TORQUE-39) Wrong database name in generated XML
schema with jdbc task
Wrong database name in generated XML schema with jdbc task
----------------------------------------------------------
Key: TORQUE-39
URL: http://issues.apache.org/jira/browse/TORQUE-39
Project: Torque
Type: Bug
Components: Generator
Versions: 3.2.1
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: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Issue Comment Edited: (TORQUE-39) Wrong database name in
generated XML schema with jdbc task
Posted by "ivano luberti (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667660#action_12667660 ]
iluber edited comment on TORQUE-39 at 1/27/09 4:45 AM:
--------------------------------------------------------------
Thomas, you just asked me to create here an issue about this matter but it seems somethin that has been already pointed out.
But it is so old you maybe have forgotten about it
I would only add a consideration to the ones above: when classes are generated using the wrong db name, that name is used by Torque runtime when it tries to connect to the db.
I think that coherence should be guaranteed between the way generator and runtime connect to the same database
was (Author: iluber):
Thomas, you just asked me to create here an issue about this matter but it seems somethin that has been already pointed out.
But it is so old you maybe have forgotten about it
> Wrong database name in generated XML schema with jdbc task
> ----------------------------------------------------------
>
> Key: TORQUE-39
> URL: https://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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Commented: (TORQUE-39) Wrong database name in generated XML
schema with jdbc task
Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534607 ]
Thomas Fischer commented on TORQUE-39:
--------------------------------------
I am not convinced about adding a new property.
a) it is a lot of work. The ant, maven1 and maven2 part need to be considered.
b) We have already a lot of properties. Is this worth yet another one ?
My suggestion is the following:
- If someone finds the new property is worth the trouble and creates a patch, I'd test and commit it.
- If not, I'd change the database name from the db username to "default". It will work in the most setups, and if someone does something unusual, he has to change the database name anyway.
If you want to create a patch, please indicate so in the next few days.
> Wrong database name in generated XML schema with jdbc task
> ----------------------------------------------------------
>
> Key: TORQUE-39
> URL: https://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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Commented: (TORQUE-39) Wrong database name in generated XML
schema with jdbc task
Posted by "CG Monroe (JIRA)" <ji...@apache.org>.
[ 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: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Commented: (TORQUE-39) Wrong database name in generated XML
schema with jdbc task
Posted by "ivano luberti (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667660#action_12667660 ]
ivano luberti commented on TORQUE-39:
-------------------------------------
Thomas, you just asked me to create here an issue about this matter but it seems somethin that has been already pointed out.
But it is so old you maybe have forgotten about it
> Wrong database name in generated XML schema with jdbc task
> ----------------------------------------------------------
>
> Key: TORQUE-39
> URL: https://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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Updated: (TORQUE-39) Wrong database name in generated XML
schema with jdbc task
Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/TORQUE-39?page=all ]
Thomas Fischer updated TORQUE-39:
---------------------------------
Affects Version/s: 3.2
(was: 3.2.1)
> 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: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Commented: (TORQUE-39) Wrong database name in generated XML
schema with jdbc task
Posted by "Thoralf Rickert (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/TORQUE-39?page=comments#action_12421539 ]
Thoralf Rickert commented on TORQUE-39:
---------------------------------------
Is it a big problem to hand over a property like "torque.databaseName" to the task or to parse the property "torque.database.url"?
> 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: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] Commented: (TORQUE-39) Wrong database name in generated XML
schema with jdbc task
Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/TORQUE-39?page=comments#action_12421294 ]
Thomas Fischer commented on TORQUE-39:
--------------------------------------
Where would you expect the "databaseName" to come from ? To my knowledge, nowhere in the generator exists the concept of a database name, so one has to be invented. In my opinion, a sensible default is the name of the database user
> 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.1
> 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: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org