[JAVA-2870] Annotations example in Java driver POJO page seems incomplete Created: 29/May/18 Updated: 28/Oct/23 Resolved: 21/Jun/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.8.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Nic Cottrell | Assignee: | Ross Lawley |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
See http://mongodb.github.io/mongo-java-driver/3.7/bson/pojos/ The Person example seems to be wrong. Doesn't the personId field need a @BsonId annotation? Also, maybe we could demonstrate the other annotations here just to be extra clear? Something like:
giving
Also weird capitalization in "The Person POJO *W*ill produce BSON similar to:"
|
| Comments |
| Comment by Githook User [ 21/Jun/18 ] |
|
Author: {'username': 'rozza', 'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com'}Message: Docs: Updated Person annotation example
|
| Comment by Ross Lawley [ 04/Jun/18 ] |
|
Thanks for the ticket, you're correct the Person instance in the annotations section is missing the annotation. Ross |