Use getattr and setattr in mongo_object