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 tf...@apache.org on 2007/05/06 12:47:40 UTC
svn commit: r535596 - in /db/torque:
runtime/trunk/src/java/org/apache/torque/util/SQLBuilder.java
site/trunk/xdocs/changes.xml
Author: tfischer
Date: Sun May 6 03:47:39 2007
New Revision: 535596
URL: http://svn.apache.org/viewvc?view=rev&rev=535596
Log:
OrderBy now accepts column names without a dot. No additional processing is made for these.
Partially fixes TORQUE-89. Thanks to Stefan Birrer for proposing the change.
Modified:
db/torque/runtime/trunk/src/java/org/apache/torque/util/SQLBuilder.java
db/torque/site/trunk/xdocs/changes.xml
Modified: db/torque/runtime/trunk/src/java/org/apache/torque/util/SQLBuilder.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/util/SQLBuilder.java?view=diff&rev=535596&r1=535595&r2=535596
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/util/SQLBuilder.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/util/SQLBuilder.java Sun May 6 03:47:39 2007
@@ -464,9 +464,12 @@
int dotPos = strippedColumnName.lastIndexOf('.');
if (dotPos == -1)
{
- throwMalformedColumnNameException(
- "order by",
- orderByColumn);
+ // We are not able to look up the table in the
+ // tableMap, as no table name is given. Simply add
+ // the orderBy and hope the user knows what he is
+ // doing.
+ orderByClause.add(orderByColumn);
+ continue;
}
String tableName = strippedColumnName.substring(0, dotPos);
Modified: db/torque/site/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/xdocs/changes.xml?view=diff&rev=535596&r1=535595&r2=535596
==============================================================================
--- db/torque/site/trunk/xdocs/changes.xml (original)
+++ db/torque/site/trunk/xdocs/changes.xml Sun May 6 03:47:39 2007
@@ -31,6 +31,10 @@
<body>
<release version="3.3-RC3" date="in SVN">
+ <action type="add" dev="tfischer" issue="TORQUE-89" due-to="Stefan Birrer">
+ OrderBy now accepts column names without a dot. No additional
+ processing is made for these.
+ </action>
<action type="fix" dev="tfischer" issue="TORQUE-90" due-to="Sean Gilligan">
Fixed Null Pointer Exceptions in Criteria.equals() and
Criteria.hashCode() if joins are null.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org