[JAVA-3550] Allow sealed traits to be polymorphically serialized and deserialized Created: 14/Dec/18  Updated: 26/Jan/23  Resolved: 26/Jan/23

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

Type: New Feature Priority: Minor - P4
Reporter: Georgi Chochov Assignee: Unassigned
Resolution: Done Votes: 2
Labels: pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Currently the driver only supports sealed classes as the base for polymorphic serialization//deserialization. As the sealed class itself isn't a case class (as extending case classes is generally a terrible idea) they are effectively abstract anyway. So, sealed traits or abstract classes should be first-class citizens, as only their subclasses matter. The implementation of this improvement would require discriminating between abstract and concrete supertypes.



 Comments   
Comment by Ross Lawley [ 26/Jan/23 ]

The PR was merged back in 2019. This ticket should have been closed along side it.

Comment by Georgi Chochov [ 14/Dec/18 ]

Proposed implementation: https://github.com/mongodb/mongo-scala-driver/pull/49

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