changed :id to klass.primary_key

This is needed for when someone’s model uses `self.primary_key =
:whatever_id` or in legacy databases where `id` is not the primary
key’s name.