Fixes scan when primary key is not defined in gorm (but is defined db-size). Useful in join tables