Author: steve.ebersole(a)jboss.com
Date: 2009-04-22 15:32:12 -0400 (Wed, 22 Apr 2009)
New Revision: 16406
Modified:
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/alias/AbstractTableAliasGeneratorTemplate.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/alias/TableAliasGenerator.java
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/tree/Table.java
Log:
minor changes to path resolution
Modified:
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/alias/AbstractTableAliasGeneratorTemplate.java
===================================================================
---
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/alias/AbstractTableAliasGeneratorTemplate.java 2009-04-22
19:06:00 UTC (rev 16405)
+++
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/alias/AbstractTableAliasGeneratorTemplate.java 2009-04-22
19:32:12 UTC (rev 16406)
@@ -99,9 +99,10 @@
}
protected final TableAliasRoot generateSqlAliasRoot(String base, int tableCount) {
+ String source = base;
base = cleanBase( base );
base = ensureAliasCapacity( base, tableCount );
- return new TableAliasRoot( base );
+ return new TableAliasRoot( source, base );
}
private String cleanBase(String base) {
Modified:
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/alias/TableAliasGenerator.java
===================================================================
---
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/alias/TableAliasGenerator.java 2009-04-22
19:06:00 UTC (rev 16405)
+++
core/branches/antlr3/src/main/java/org/hibernate/sql/ast/alias/TableAliasGenerator.java 2009-04-22
19:32:12 UTC (rev 16406)
@@ -37,12 +37,18 @@
* Encapsulation of the alias root.
*/
public static class TableAliasRoot {
+ private final String source;
private final String base;
- public TableAliasRoot(String base) {
+ public TableAliasRoot(String source, String base) {
+ this.source = source;
this.base = base;
}
+ public String getSource() {
+ return source;
+ }
+
public String getBase() {
return base;
}
Modified: core/branches/antlr3/src/main/java/org/hibernate/sql/ast/tree/Table.java
===================================================================
--- core/branches/antlr3/src/main/java/org/hibernate/sql/ast/tree/Table.java 2009-04-22
19:06:00 UTC (rev 16405)
+++ core/branches/antlr3/src/main/java/org/hibernate/sql/ast/tree/Table.java 2009-04-22
19:32:12 UTC (rev 16406)
@@ -148,7 +148,7 @@
}
public String getSourceAlias() {
- return aliasRoot.getBase();
+ return aliasRoot.getSource();
}
public void addTable(Table table) {
Show replies by date