Exemple #1
0
    def update(self):
        updates = self._get_changed_persistent_fields()
        updates = self._validate_changed_fields(updates)

        if updates:
            db_obj = db_api.update_object(self._context, self.db_model, self.id, updates)
            self.from_db_object(self, db_obj)
Exemple #2
0
    def update(self):
        updates = self._get_changed_persistent_fields()
        updates = self._validate_changed_fields(updates)

        if updates:
            db_obj = db_api.update_object(self._context, self.db_model,
                                          self.id, updates)
            self.from_db_object(self, db_obj)
Exemple #3
0
    def update(self):
        updates = self._get_changed_persistent_fields()
        updates = self._validate_changed_fields(updates)

        if updates:
            db_obj = db_api.update_object(self._context, self.db_model,
                                          getattr(self, self.primary_key),
                                          updates, key=self.primary_key)
            self.from_db_object(self, db_obj)
Exemple #4
0
    def update(self):
        updates = self._get_changed_persistent_fields()
        updates = self._validate_changed_fields(updates)

        if updates:
            db_obj = db_api.update_object(self._context, self.db_model,
                                          getattr(self, self.primary_key),
                                          updates, key=self.primary_key)
            self.from_db_object(self, db_obj)