Opened 17 years ago
Closed 16 years ago
#735 closed defect (worksforme)
0.6-Patch: version of new primitives created by cloning can become out-of-sync
Reported by: | Henry Loenwind | Owned by: | framm |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | 0.6 | Cc: |
Description
When creating a new object by cloning an existing one (e.g. Way newWay = new Way(oldWay); newWay.id = 0;) The new object has the same version number as the old one. When it is sent to the server (create), the id is upodated from the server's reply, but the version stays the same. Now, if that object is changed, and then uploaded again, josm will send the bogus version number---I don't think, the server will like that.
Solution A: Implement a proper "cloneToCopy()" method that takes care of all this. Problem: All plugins must be changed.
Solution B: Force the version number to 0 when the id is set by the create api call. Not as nice, but no change to other code is needed.
Should be fixed now.