dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41390
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21081: Id populator for program_attributes
------------------------------------------------------------
revno: 21081
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-11-17 10:50:47 +0100
message:
Id populator for program_attributes
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
--
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/common/IdentityPopulator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java 2015-06-12 20:55:08 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/IdentityPopulator.java 2015-11-17 09:50:47 +0000
@@ -51,7 +51,8 @@
private static final Map<String, String> TABLE_ID_MAP = DimensionalObjectUtils.asMap(
"dataelementcategoryoption", "categoryoptionid",
- "dataelementcategory", "categoryid" );
+ "dataelementcategory", "categoryid",
+ "program_attributes", "programtrackedentityattributeid" );
private List<String> tables = new ArrayList<>();
@@ -176,7 +177,7 @@
private String getIdColumn( String table )
{
- return TABLE_ID_MAP.containsKey( table ) ? TABLE_ID_MAP.get( table ) : (table + "id");
+ return TABLE_ID_MAP.getOrDefault( table, ( table + "id" ) );
}
private void createOrgUnitUuids()
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2015-11-17 04:18:36 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2015-11-17 09:50:47 +0000
@@ -1385,7 +1385,6 @@
<value>dataelement</value>
<value>dataelementgroup</value>
<value>dataelementgroupset</value>
- <value>sqlview</value>
<value>dataelementcategory</value>
<value>dataelementcategoryoption</value>
<value>categorycombo</value>
@@ -1410,11 +1409,13 @@
<value>programinstance</value>
<value>programstageinstance</value>
<value>programstagesection</value>
+ <value>program_attributes</value>
<value>programvalidation</value>
<value>programrule</value>
<value>programruleaction</value>
<value>programrulevariable</value>
<value>relationshiptype</value>
+ <value>sqlview</value>
</list>
</property>
</bean>