emberjs/data — pull request #564 by jefflab (2012-12-30 19:34:34+00:00)
Title: cover null case for belongsTo relationship

I was getting an error:

TypeError: Cannot read property 'clientId' of null

The error was caused by the fact that this statement doesn't protect against a `null` id:

if (typeof id === 'object') {
return store.findByClientId(type, id.clientId);
}

This pull request adds the null check, and also a test.