brianleroux/lawnchair — pull request #143 by ruiwen (2013-01-12 10:39:10+00:00)
Title: Use 'id' as key

Adding the ability to use 'id' as the record key instead of manually specifying 'key' before save()'ing.

The rationale is that if I'm receiving data from the backend server, it's more likely that the primary key is named 'id' than it is named 'key', so this patch handles that.

I've only patched the adapters for memory, dom, webkit-sql and indexeddb though.

Tests included