docs: def delete(self):
          """delete the object from the db if pk is set"""
          ret = False
          q = self.query
          pk = self.pk
          if pk:
              pk_name = self.schema.pk.name
              self.query.is_field(pk_name, pk).delete()
              setattr(self, pk_name, None)
  
              # mark all the fields that still exist as modified
              self.reset_modified()
              for field_name in self.schema.fields:
                  if getattr(self, field_name, None) != None:
                      self.modified_fields.add(field_name)
  
              ret = True
  
          return ret