Add support for primary key different from id
Use offical gorm package in tests