Closed Pokerkoffer closed 7 years ago
I'll have a look at it - there is probably bug in the library as i have not test map.
Ok, it's quite complicated issue. I've found a way but it takes some time to implement and test.
ok, thank you very much for your effort!
any updates on this? Thanks! 😊
Will have some time probably during the weekend. I'll let you know.
Thank you very much!
Simple Maps are working. I'll have to do some refactoring do enable also maps like Map<String, List<EntityRef>>
and similar more complex with "inner" generics.
Will be released as 1.0.8 after a while
Be aware that I had to increase target version to Java 8.
Hi, i have the following code:
Parent:
Child:
Main:
The following Json is inserted into mongoDB:
The following code throws a ClassCastException:
Exception in thread "main" java.lang.ClassCastException: org.bson.Document cannot be cast to Child
When i inspect the class
parent2
(the one that is filled with the values read from the db) the values of Mapchilds
are of typebson.Document
and notChild
. See screenshot below:The same exception occurs, when I add another child. Is it possible, that the Map<String, Child> is not recognized or mapped correctly?