- 
                Notifications
    
You must be signed in to change notification settings  - Fork 19
 
Open
Labels
Description
This comes from https://issues.apache.org/jira/browse/MNG-6227
Consider declare a field which maps to {{java.util.Properties}}, the field is named props:
<props>
  <pr0n>awesome</pr0n>
  <pr0n>horrible</pr0n>
</props>
The latter will overrwite the former:
            else if ( checkFieldWithDuplicate( parser, "props", null, parsed ) )
            {
                InputLocation _locations;
                _locations = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
                model.setLocation( "props", _locations );
                while ( parser.nextTag() == XmlPullParser.START_TAG )
                {
                    String key = parser.getName();
                    _location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
                    _locations.setLocation( key, _location );
                    String value = parser.nextText().trim();
                    model.addProperty( key, value );
                }
            }
Either Modello should make behavior configurate or it should use a nested parsed set with checkFieldWithDuplicate() to enforce uniqueness and fail on duplicity. Everything else slips through and leads to undesired behavior.