Hi Thomas
With this error if you use SAPDB, the error occur too.
I fix it on JDBCQueryExpression too.
Because my skill in Castor project, I don't understand the impact of
changes in other cases, this need tests, OK.
follow the cvs diff
Index: JDBCQueryExpression.java
===================================================================
RCS file:
/cvs/castor/castor/src/main/org/exolab/castor/jdo/drivers/JDBCQueryExpression.java,v
retrieving revision 1.19
diff -r1.19 JDBCQueryExpression.java
207a208,222
> /** Workaround to me only **
> * I'm getting an duplicate tables on FROM clause
> * causing wrong results on select hierarchie
> */
> Enumeration keys = _tables.keys();
> String value = null;
> String key = null;
> String leftTableAlias = null;
> while ((keys.hasMoreElements()) && (leftTableAlias == null)) {
> key = (String)keys.nextElement();
> value =(String)_tables.get(key);
> if (value.equals(leftTable)) {
> leftTableAlias = key;
> }
> }
209,211c224,232
< _tables.put( leftTable, leftTable );
< _tables.put( rightTableAlias, rightTable );
< join = new Join( leftTable, leftColumn, rightTableAlias,
rightColumn, false );
---
> if (leftTableAlias == null) {
> _tables.put( leftTable, leftTable );
> _tables.put( rightTableAlias, rightTable );
> join = new Join( leftTable, leftColumn, rightTableAlias, rightColumn,
>false );
> } else {
> _tables.put( rightTableAlias, rightTable );
> join = new Join( leftTableAlias, leftColumn, rightTableAlias,
>rightColumn, false );
> }
> //End of changes
Best regards
Cl�vis Wichoski
Supridatta
[EMAIL PROTECTED]
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev