spine / spine

Lightweight MVC library for building JavaScript applications

Home Page:http://spine.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Model#changeID does not persist the new id

hrigu opened this issue · comments

after calling record.changeID(new_id), I can find the changed record with the new id but when I call the id on the found record the previous id is returned.

In the spine.coffeee source code on changeID method, the save() call is commented out due this issue: #597

record.changeID(33)
console.info record.id # ==> 33, correct
x = Record.find(33) # finds the correct record
console.info x.id # ==> 'c-3', should be 33

looks like we are 90% there for having a test case added. Will see if I can get that into a jasmine test this week.