code: def _getID(self):
          
          id = []
          for key in self._sqlPrimary:
              value = self.__dict__[key]
              if isinstance(value, Forgetter):
                  # It's another object, we store only the ID
                  if value._new:
                      # It's a new object too, it must be saved!
                      value.save()
                  try:
                      (value,) = value._getID()
                  except:
                      raise "Unsupported: Part %s of %s primary key is a reference to %s, with multiple-primary-key %s " % (key, self.__class__, value.__class__, value)
              id.append(value)
          return id
docs: Get the ID values as a tuple annotated by sqlPrimary