[JAVA-2453] Manually ID'd Versioned Entities are not Optimistically Locked Created: 20/Feb/17 Updated: 21/Feb/17 Resolved: 21/Feb/17 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Write Operations |
| Affects Version/s: | 3.4.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sage M Pierce | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
For Entities that have non DB-Generated IDs, "Saves" to the DB are not optimistically locked. For example, it is possible to have two Versioned Entities with the same primary key and null versions and one will overwrite the other. This is undesirable when primary keys are meaningful and meaningful data is associated with the Entity. This behavior is exposed by the following test: {{ }} |
| Comments |
| Comment by Ross Lawley [ 21/Feb/17 ] |
|
Hi Sage-Pierce, Firstly, thank you for the ticket and the PR, it will be followed up on Github. As this project is for the Mongo Java Driver only I'm marking it as "won't fix" - this only due to the context of this Jira Project. As you may have noticed Morphia is supported via Github issues and Pull requests directly and your PR will be followed up there. Thanks again, Ross |
| Comment by Sage M Pierce [ 20/Feb/17 ] |
|
Created PR here: https://github.com/mongodb/morphia/pull/1152 |