Remove dead branch when restoring ID within a transaction

There is no way to have an instance of an Active Record model where
`has_attribute?(self.class.primary_key)` returns false. The record is
always initialized in such a way that `@raw_attributes` will have an id
key with nil for the value.

Reduces the number of places outside of attribute methods which care
about the internals of how we store and type cast attributes.
yes you are right.. :thumbsup: