Overloaded - we don't have nextval() in mysql

def _saveDB(self):
        """Overloaded - we don't have nextval() in mysql"""
        # We're a "fresh" copy now
        self._updated = time.time()
        if self._new:
            operation = 'INSERT'
        else:
            operation = 'UPDATE'
        (sql, fields) = self._prepareSQL(operation)
        values = []
        for field in fields:
            value = getattr(self, field)
            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 "Can't reference multiple-primary-key: %s" % value
            values.append(value)
        cursor = self.cursor()
        cursor.execute(sql, values)
        # cursor.commit()

        if not self._validID():
            if not len(self._getID()) == 1:
                raise "Can't retrieve auto-inserted ID for multiple-primary-key"
            # Here's the mysql magic to get the new ID
            self._setID(cursor.insert_id())
        cursor.close()
        self._new = False