Update of /var/cvs/contributions/CMSContainer_Modules/dataconversion/src/java/com/finalist/cmsc/dataconversion/dataaccess In directory james.mmbase.org:/tmp/cvs-serv27312/dataaccess
Modified Files: DataAccessor.java Log Message: CMSC-1166, KNMI migration to the CMS Container,improve reverse See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Modules/dataconversion/src/java/com/finalist/cmsc/dataconversion/dataaccess See also: http://www.mmbase.org/jira/browse/CMSC-1166 Index: DataAccessor.java =================================================================== RCS file: /var/cvs/contributions/CMSContainer_Modules/dataconversion/src/java/com/finalist/cmsc/dataconversion/dataaccess/DataAccessor.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- DataAccessor.java 2 Dec 2008 10:37:03 -0000 1.7 +++ DataAccessor.java 10 Dec 2008 07:17:55 -0000 1.8 @@ -276,8 +276,15 @@ try { connection = dataSource.getConnection(); statement = connection.createStatement(); - sql = "select * from " + " " + relData.getSourceRelationType() + " " + "where snumber in (select number from " - + relData.getRelateTable() + ") and dnumber in (select number from " + relData.getTableName() + ")"; + if ("sourcetype".equals(relData.getReverse())) { + sql = "select * from " + " " + relData.getSourceRelationType() + " " + + "where snumber in (select number from " + relData.getTableName() + + ") and dnumber in (select number from " + relData.getRelateTable()+ ")"; + }else{ + sql = "select * from " + " " + relData.getSourceRelationType() + " " + + "where snumber in (select number from " + relData.getRelateTable() + + ") and dnumber in (select number from " + relData.getTableName() + ")"; + } rs = statement.executeQuery(sql); while (rs.next()) { sv = rs.getInt("snumber"); _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs