[JAVA-3408] TypeParameters for nested types are not properly collected Created: 27/Aug/19 Updated: 28/Oct/23 Resolved: 04/May/21 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | POJO |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Ross Lawley | Assignee: | Ross Lawley |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Case: | (copied to CRM) |
| Description |
The type for values is not correctly captured and results in the codec registry looking for a handler for List<List<Object>> and not List<List<Float>>. |
| Comments |
| Comment by Ross Lawley [ 04/May/21 ] |
|
Cherry pick to 3.12.x - https://github.com/mongodb/mongo-java-driver/pull/704 |
| Comment by Githook User [ 03/Feb/20 ] |
|
Author: {'name': 'Ross Lawley', 'username': 'rozza', 'email': 'ross.lawley@gmail.com'}Message: PojoCodec: Fix mapping for nested generic types
|
| Comment by Ross Lawley [ 24/Jan/20 ] |
| Comment by Justin Lee [ 27/Aug/19 ] |
|
In Morphia how I (mostly) support this is to treat those parameter types as Objects. Then I have an ObjectCodec that will set a bookmark and scan for the discriminator value. Having that, it can do a registry lookup for the correct codec and then delegate. |