dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14770
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5114: Fixed illegal sql syntax, caused import test to fail
------------------------------------------------------------
revno: 5114
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-11-04 10:28:14 +0100
message:
Fixed illegal sql syntax, caused import test to fail
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java 2011-11-03 01:02:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java 2011-11-04 09:28:14 +0000
@@ -37,7 +37,6 @@
import org.hisp.dhis.common.GenericIdentifiableObjectStore;
import org.hisp.dhis.system.util.Filter;
import org.hisp.dhis.system.util.FilterUtils;
-import org.hisp.dhis.system.util.UUIdUtils;
import org.springframework.transaction.annotation.Transactional;
/**
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java 2011-11-03 14:27:18 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java 2011-11-04 09:28:14 +0000
@@ -53,7 +53,6 @@
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.organisationunit.OrganisationUnitStore;
import org.hisp.dhis.system.objectmapper.OrganisationUnitRelationshipRowMapper;
-import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowCallbackHandler;
/**
@@ -219,7 +218,7 @@
public OrganisationUnitHierarchy getOrganisationUnitHierarchy()
{
- final String sql = "SELECT organisationunitid, parentid FROM organisationunit";
+ final String sql = "select organisationunitid, parentid from organisationunit";
return new OrganisationUnitHierarchy( jdbcTemplate.query( sql, new OrganisationUnitRelationshipRowMapper() ) );
}
@@ -230,8 +229,8 @@
StatementHolder holder = statementManager.getHolder();
- final String sql = "UPDATE organisationunit " + "SET parentid='" + parentId + "', SET lastUpdated='"
- + now + "' " + "WHERE organisationunitid='" + organisationUnitId + "'";
+ final String sql = "update organisationunit " + "set parentid=" + parentId + ", lastupdated='"
+ + now + "' " + "where organisationunitid=" + organisationUnitId;
holder.executeUpdate( sql );
}