You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a map of type LinkedHashMap<String, Object> is updated via MongoOperations findAndModify or updateFirst, the _class field is not saved for the map values. Therefore, later reads of the data do not convert the value to the correct type, instead leaving it as LinkedHashMap.
Please see attached maven project for test illustrating the problem.
thanks Amy Aldredge for report and tests - good catch! As it seems update mapping does not correctly pass on type hints for the defined map value type. will have to check
Amy Aldredge opened DATAMONGO-1236 and commented
When a map of type LinkedHashMap<String, Object> is updated via MongoOperations findAndModify or updateFirst, the _class field is not saved for the map values. Therefore, later reads of the data do not convert the value to the correct type, instead leaving it as LinkedHashMap.
Please see attached maven project for test illustrating the problem.
Affects: 1.6.2 (Evans SR2)
Attachments:
Referenced from: pull request #301
Backported to: 1.7.1 (Fowler SR1), 1.6.3 (Evans SR3)
The text was updated successfully, but these errors were encountered: