Fixed hasOne relation

The hasOne relation is now tested and will correctly infer the
foreignKey if one is not provided.
Merge pull request #21 from iancmyers/has-one-fix

Fixed hasOne relation