Partial implementation of a has_one association, and tests