Announcement Announcement Module
Collapse
No announcement yet.
MappingMongoConverter 1.0.0.M3 Fails to convert ArrayList inside of a LinkedHashMap.. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MappingMongoConverter 1.0.0.M3 Fails to convert ArrayList inside of a LinkedHashMap..

    We are using Spring Data Mongo Templates (1.0.0.M3). While trying to persist a document which contains a LinkedHashMap containing an ArrayList, we noticed that the ArrayList is not properly written out. While the properties of the ArrayList are written, the actual contents of the list are not.

    When the MappingMongoConvert gets to the ArrayList, it writes out the "size" parameter, but does not write out any data values. In the latest snapshot nightly build, we noticed that among many package renames there were changes to the MappingMongoConverter to deal with Collections a little better. We changed our Maven dependency to include the latest snapshot, changed the imports accordingly, however, when running, non of our factories are getting registered in the Spring Context, so the @Autowired dependency injection is failing and our application does not start.

    We have tried many different configurations, however, have not been able to get the repositories to properly register. We are not getting other errors (such as class not found which would prevent the repositories from being created), however, our repositories are just not registering. This functionality was working in 1.0.0.M3.

    We really would like to try the latest snapshot, however, but we are not sure what we should do so that repositories are recognized.

    Has anyone else ran into these issues?

    Thanks.
    -AP_
    Last edited by apara; Sep 1st, 2011, 09:00 PM.

  • #2
    After playing around with M3, we decided to grab what was marked as M4 in the GIT repository and build it ourselves. The M4 was a little better, however, still required some patching to get to work. Again, in our case we are trying to persist a complex structure which contains Maps with values of Collection which themselves contain other Maps with other collections as values. In M4, the fields of the Map were being persisted not the actual values if the Map was an element in a Collection. We modified the source to include an additional check to see if the value is a Map in the part of the MappingMongoConverter which creates a list element.

    -AP_

    Comment

    Working...
    X