Replace set_primary_key with self.primary_key=