Returns constraints to target a specific model.

def get_model_id_constraints(model):
  """Returns constraints to target a specific model."""
  pkname = model.primary_key_name
  pkey = model.primary_key
  return get_id_constraints(pkname, pkey)