maccman/spine — pull request #319 by doublerebel (2012-06-04 19:02:12+00:00)
Title: Prevent calling uid twice in Spine.Model, by setting cid in attributes before constructing item

A newly created item receives a new cid.
Then in dup, attributes() never has a cid, therefore when constructor is called, cid can't be read from attributes.
I'm guessing the or= was removed because it was never called in the case of double uid: newrecord is false, so a new cid is always created and taken instead of the original.
I believe the best fix is to swap in cid and out id before the duplicate is created.