Shopify/batman — pull request #503 by smathy (2012-07-19 04:37:25+00:00)
Title: Nicer non-"id" primaryKey behavior

I originally opened this as #447, but I didn't understand the tests then and screwed it up. Here's my next shot.

There's a failing test commit first up, to show the problem that I'm resolving - then a slight change in how `fromJSON` handles the non-"id" primaryKey scenario.

I think that actually `delete`ing `obj.id` is really what you want to be doing here. Basically you want to ensure that `id` is never overwritten by an id in the JSON, so it makes space for the getter.

This was a boring PR, so I'll try to pimp it out with emoji - here's an eggplant :eggplant:

Shazaam :zap::star::zap: