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
Precondition: Class structure with generic fields. Expected: Generic fields should be mapped correctly. Actual: In the following case, when I save CharFoo objects and then fetch it from DB, the generic field abstractFooField is converted back to a Character, but bar.field from the sub-document is converted to a String and not to a Character.
I fixed DATACMNS-783 and got your example working with the patched version. We now create synthetical TypeInformation instances from the raw type detected in the document to be read and the current generics context to reestablish the missing type information. Could fix it in Spring Data Commons entirely which makes the fix back-portable into the maintenance releases for Gosling and Fowler, the former expected for early next week
Mircea Gaceanu opened DATAMONGO-1312 and commented
Precondition: Class structure with generic fields.
Expected: Generic fields should be mapped correctly.
Actual: In the following case, when I save CharFoo objects and then fetch it from DB, the generic field abstractFooField is converted back to a Character, but bar.field from the sub-document is converted to a String and not to a Character.
Data model:
Unit test:
Result:
MongoDB document:
I'm attaching also the test project (Intellij)
Affects: 1.8 GA (Gosling)
Reference URL: http://stackoverflow.com/questions/26630523/springdata-mongodb-convert-generic-sub-document-fields
Attachments:
Issue Links:
("depends on")
Backported to: 1.8.1 (Gosling SR1), 1.7.3 (Fowler SR3)
The text was updated successfully, but these errors were encountered: