[ https://issues.apache.org/jira/browse/CONFIGURATION-342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641975#action_12641975
]
Scott Wells commented on CONFIGURATION-342:
-------------------------------------------
I've actually written a simple flatten()/unflatten() pair that flattens multi-valued properties
when during save and unflattens then during load. You end up with multiple rows in the DB
of the form:
<key>.mventry00 value1
<key>.mventry01 value2
<key>.mventry02 value3
but to the API user, things work as expected because those values are aggregated back into
an actual list before being passed back. It's not perfect, and it doesn't get to the point
where I could marshal/unmarshal a full hierarchical configuration to/from the DB without using
a CLOB, but it's a start. I can send you what I have if you're interested...
> DatabaseConfiguration.copy() loses list/array values
> ----------------------------------------------------
>
> Key: CONFIGURATION-342
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-342
> Project: Commons Configuration
> Issue Type: Bug
> Components: Type conversion
> Affects Versions: 1.5
> Reporter: Scott Wells
>
> I've found a bug where adding a list property to a BaseConfiguration, then copying that
full BaseConfiguration to a DatabaseConfiguration, the list is lost and only the first element
is copied to the destination DatabaseConfiguration. For example:
> BaseConfiguration bc = new BaseConfiguration();
> bc.addProperty("myList", Arrays.asList("1", "2", "3", "4");
> DatabaseConfiguration dc = new DatabaseConfiguration(...);
> dc.copy(bc);
> List list = dc.getList("myList");
> // At this point, you'll get a single element list containing only "1"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.