Add setter primary_key if not id for object serilaizer