[JAVA-2594] Allow custom Map / collection implementations with the PojoCodec Created: 08/Sep/17  Updated: 29/Oct/23  Resolved: 06/Dec/17

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

Type: Improvement Priority: Major - P3
Reporter: Ross Lawley Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Currently, custom Map or collection implementations like Document or BsonDocument cannot be a property in a POJO as it fails TypeData validation.

We can reflect on the actual type parameters of the Collection / Map where the implementations have been specialised.



 Comments   
Comment by Ross Lawley [ 06/Dec/17 ]

Fixed in c9e442c4da1c0137e2a9af05f488f0f7463a7ab7.

Comment by Ross Lawley [ 15/Sep/17 ]

Also need to recurse the super classes which may extend the Map interface. Eg: RawBsonDocument which extends BsonDocument that implements Map<String, BsonValue>

Comment by Ross Lawley [ 08/Sep/17 ]

PR: https://github.com/rozza/mongo-java-driver/pull/213

Generated at Thu Feb 08 08:57:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.