[JAVA-4916] BsonDiscriminator key not populated on reads Created: 23/Mar/23 Updated: 27/Oct/23 Resolved: 11/Apr/23 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | POJO |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Question | Priority: | Unknown |
| Reporter: | Darren Matthews | Assignee: | Ross Lawley |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
| Comments |
| Comment by PM Bot [ 11/Apr/23 ] | ||||||||||
|
There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to comment on this if you're able to provide more information. | ||||||||||
| Comment by PM Bot [ 04/Apr/23 ] | ||||||||||
|
Hey darrenmatthews776@googlemail.com, We need additional details to investigate the problem. If this is still an issue for you, please provide the requested information. | ||||||||||
| Comment by Ross Lawley [ 28/Mar/23 ] | ||||||||||
|
Hi darrenmatthews776@googlemail.com, Thanks for the ticket. The discriminator field is considered internal metadata used to help the PojoCodec determine which class to use as the concrete instance. There may be some annotations or conventions that you can use (either existing or custom) that would allow it to be used as a field value. However, the expectation is that it is internal data aside from the POJO data. All the best, Ross | ||||||||||
| Comment by Darren Matthews [ 23/Mar/23 ] | ||||||||||
|
Adding a default constructor into the child works i.e.
My expectation is that is should just work (it might because im using an ENUM instead of a string?) |