Modify

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.

Attachments (0)

Change History (1)

comment:1 by stoecker, 16 years ago

Resolution: worksforme
Status: newclosed

Should be fixed now.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.