[JAVA-4740] Support deserialization of records with generic parameters Created: 27/Sep/22  Updated: 28/Oct/23  Resolved: 30/Sep/22

Status: Closed
Project: Java Driver
Component/s: POJO
Affects Version/s: None
Fix Version/s: 4.8.0

Type: New Feature Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Related
related to JAVA-4667 Support generic List and Map with POJ... Closed
is related to JAVA-4747 Support wildcard types in record codec Backlog
is related to JAVA-4745 Handle recursive types in parameteriz... Closed
Documentation Changes: Needed

 Description   

Add ParameterizedRecordCodec so that top level records can contain nested generic records eg:

public record TestRecordWithListGenericConcrete(
   @BsonId ObjectId id, 
   TestRecordWithListGeneric<TestRecordEmbedded> nestedRecords) {
}
 
public record TestRecordWithListGeneric<T>(
    List<T> nestedRecords) {
}



 Comments   
Comment by Githook User [ 30/Sep/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Support encoding/decoding of parameterized records (#1005)

JAVA-4740
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/ba39a2c34598d62ebf59ece0a69bdf946152ea05

Generated at Thu Feb 08 09:02:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.