def schema_update(self, data, merge=False):
        """Update the object based on JSON schema properties."""
        validate(data, self._schema)
        db.session.add(self)
        for prop in self.schema_visitor.properties:
            if prop.name == 'id':
                continue
            if prop.name not in data:
                continue
            prop_data = data[prop.name]
            if prop.is_value:
                self._schema_update_value(prop, prop_data)
            elif prop.is_object and self._schema_recurse:
                self._schema_update_object(prop, prop_data)
            elif prop.is_array and self._schema_recurse:
                self._schema_update_array(prop, prop_data, merge=merge)
        if isinstance(self, DatedModel):
            self.updated_at = datetime.utcnow()
dataset/ETHPy150Open pudo/aleph/aleph/model/schema_model.py/SchemaModel.schema_update/original