Make it work with polymorphic has_one relations.