[JAVA-2768] Add annotation to exclude id field from being marked as the IdProperty. Created: 02/Feb/18 Updated: 28/Oct/23 Resolved: 06/Feb/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | POJO |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.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 | ||
| Issue Links: |
|
||||||||
| Description |
|
Some users may have two "id" fields - the automatic "_id" and their own. |
| Comments |
| Comment by Ross Lawley [ 06/Feb/18 ] |
|
In the 3.7.0 release the @BsonProperty annotation can be used to ensure that a id property is not automatically converted automatically to _id. |
| Comment by Githook User [ 06/Feb/18 ] |
|
Author: {'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley', 'username': 'rozza'}Message: Fixed the BsonProperty annotation interaction for idProperty Allows users to use the default conventions and turn off automatic
|
| Comment by Ross Lawley [ 02/Feb/18 ] |