← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16900: minor bugfix, in :persisted filter, if property is collection, use collectioName to lookup in pro...

 

------------------------------------------------------------
revno: 16900
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-01 17:14:10 +0700
message:
  minor bugfix, in :persisted filter, if property is collection, use collectioName to lookup in propertiesMap
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java	2014-09-30 10:15:37 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/fieldfilter/DefaultFieldFilterService.java	2014-10-01 10:14:10 +0000
@@ -67,13 +67,13 @@
     @Autowired
     private SchemaService schemaService;
 
-    @Autowired( required = false )
+    @Autowired(required = false)
     private Set<PresetProvider> presetProviders = Sets.newHashSet();
 
-    @Autowired( required = false )
+    @Autowired(required = false)
     private Set<NodePropertyConverter> nodePropertyConverters = Sets.newHashSet();
 
-    @Autowired( required = false )
+    @Autowired(required = false)
     private Set<NodeTransformer> nodeTransformers = Sets.newHashSet();
 
     private ImmutableMap<String, PresetProvider> presets = ImmutableMap.of();
@@ -335,7 +335,14 @@
                 {
                     if ( property.isPersisted() )
                     {
-                        fieldMap.put( property.getName(), new FieldMap() );
+                        if ( property.isCollection() )
+                        {
+                            fieldMap.put( property.getCollectionName(), new FieldMap() );
+                        }
+                        else
+                        {
+                            fieldMap.put( property.getName(), new FieldMap() );
+                        }
                     }
                 }