maccman/spine — Issue #148: Can't find by GUID after ajax save
Author: markct
Created: 2011-12-01 18:16:35+00:00
State: open

In [this article](http://alexmaccaw.co.uk/posts/async_ui) you claim "If the response from an Ajax create request to the server returns a new ID, Spine will switch to using the server specified ID. Both the new and old ID will still work, and the API to find records is still the same."

I can see that Spine retains the GUID, but after the ajax save is complete, I am unable to find the object by its GUID.

Is the claim false, or am I doing something wrong?

```javascript
Test.one('update', function() {
console.log('After update - does '+id+' exist? '+(Test.exists(id)? 'yes' : 'no'));
});

var id = Test.create({
name: 'Indiana'
}).id;

console.log('Before update - does '+id+' exist? '+(Test.exists(id)? 'yes' : 'no'));
```

For this code, I get the following output in the console:

Before update - does 61210B3F-F9D3-4223-A2B3-4E1E9E3174EF exist? yes
After update - does 61210B3F-F9D3-4223-A2B3-4E1E9E3174EF exist? no