Fix depreciation warning

Hi Bruno,

I fix the depreciation warning:

DEPRECIATION WARNING: Calling set_primary_key is deprecated.

If you agree please added at gem.

Regards.