Move the object to the top of the list

@param     ConnectionInterface $con optional connection

@return    ChildCustomerGroup the current object
973448
public function moveToTop(ConnectionInterface $con = null)
    {
        if ($this->isFirst()) {
            return $this;
        }

        return $this->moveToRank(1, $con);
    }
111866
public function getNext(ConnectionInterface $con = null)
    {

        $query = ChildCustomerGroupQuery::create();

        $query->filterByRank($this->getPosition() + 1);


        return $query->findOne($con);
    }
590441
protected function doInsert(ConnectionInterface $con)
    {
        $modifiedColumns = array();
        $index = 0;

        $this->modifiedColumns[PictureTableMap::COL_ID] = true;
        if (null !== $this->id) {
            throw new PropelException('Cannot insert a value for auto-increment primary key (' . PictureTableMap::COL_ID . ')');
        }

         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(PictureTableMap::COL_ID)) {
            $modifiedColumns[':p' . $index++]  = '`id`';
        }
        if ($this->isColumnModified(PictureTableMap::COL_TITLE)) {
            $modifiedColumns[':p' . $index++]  = '`title`';
        }
        if ($this->isColumnModified(PictureTableMap::COL_DESCRIPTION)) {
            $modifiedColumns[':p' . $index++]  = '`description`';
        }
        if ($this->isColumnModified(PictureTableMap::COL_URL)) {
            $modifiedColumns[':p' . $index++]  = '`url`';
        }
        if ($this->isColumnModified(PictureTableMap::COL_THUMB_URL)) {
            $modifiedColumns[':p' . $index++]  = '`thumb_url`';
        }
        if ($this->isColumnModified(PictureTableMap::COL_SKILL_ID)) {
            $modifiedColumns[':p' . $index++]  = '`skill_id`';
        }
        if ($this->isColumnModified(PictureTableMap::COL_PHOTOGRAPHER)) {
            $modifiedColumns[':p' . $index++]  = '`photographer`';
        }
        if ($this->isColumnModified(PictureTableMap::COL_PHOTOGRAPHER_ID)) {
            $modifiedColumns[':p' . $index++]  = '`photographer_id`';
        }
        if ($this->isColumnModified(PictureTableMap::COL_ATHLETE)) {
            $modifiedColumns[':p' . $index++]  = '`athlete`';
        }
        if ($this->isColumnModified(PictureTableMap::COL_ATHLETE_ID)) {
            $modifiedColumns[':p' . $index++]  = '`athlete_id`';
        }
        if ($this->isColumnModified(PictureTableMap::COL_UPLOADER_ID)) {
            $modifiedColumns[':p' . $index++]  = '`uploader_id`';
        }

        $sql = sprintf(
            'INSERT INTO `kk_trixionary_picture` (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case '`id`':
                        $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
                        break;
                    case '`title`':
                        $stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
                        break;
                    case '`description`':
                        $stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
                        break;
                    case '`url`':
                        $stmt->bindValue($identifier, $this->url, PDO::PARAM_STR);
                        break;
                    case '`thumb_url`':
                        $stmt->bindValue($identifier, $this->thumb_url, PDO::PARAM_STR);
                        break;
                    case '`skill_id`':
                        $stmt->bindValue($identifier, $this->skill_id, PDO::PARAM_INT);
                        break;
                    case '`photographer`':
                        $stmt->bindValue($identifier, $this->photographer, PDO::PARAM_STR);
                        break;
                    case '`photographer_id`':
                        $stmt->bindValue($identifier, $this->photographer_id, PDO::PARAM_INT);
                        break;
                    case '`athlete`':
                        $stmt->bindValue($identifier, $this->athlete, PDO::PARAM_STR);
                        break;
                    case '`athlete_id`':
                        $stmt->bindValue($identifier, $this->athlete_id, PDO::PARAM_INT);
                        break;
                    case '`uploader_id`':
                        $stmt->bindValue($identifier, $this->uploader_id, PDO::PARAM_INT);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);
        }

        try {
            $pk = $con->lastInsertId();
        } catch (Exception $e) {
            throw new PropelException('Unable to get autoincrement id.', 0, $e);
        }
        $this->setId($pk);

        $this->setNew(false);
    }
666039
protected function doInsert(ConnectionInterface $con)
    {
        $modifiedColumns = array();
        $index = 0;

        $this->modifiedColumns[PageTableMap::COL_ID] = true;
        if (null !== $this->id) {
            throw new PropelException('Cannot insert a value for auto-increment primary key (' . PageTableMap::COL_ID . ')');
        }

         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(PageTableMap::COL_ID)) {
            $modifiedColumns[':p' . $index++]  = 'id';
        }
        if ($this->isColumnModified(PageTableMap::COL_SOURCE_ID)) {
            $modifiedColumns[':p' . $index++]  = 'source_id';
        }
        if ($this->isColumnModified(PageTableMap::COL_PAGEID)) {
            $modifiedColumns[':p' . $index++]  = 'pageid';
        }
        if ($this->isColumnModified(PageTableMap::COL_TITLE)) {
            $modifiedColumns[':p' . $index++]  = 'title';
        }
        if ($this->isColumnModified(PageTableMap::COL_DISPLAYTITLE)) {
            $modifiedColumns[':p' . $index++]  = 'displaytitle';
        }
        if ($this->isColumnModified(PageTableMap::COL_PAGE_IMAGE_FREE)) {
            $modifiedColumns[':p' . $index++]  = 'page_image_free';
        }
        if ($this->isColumnModified(PageTableMap::COL_WIKIBASE_ITEM)) {
            $modifiedColumns[':p' . $index++]  = 'wikibase_item';
        }
        if ($this->isColumnModified(PageTableMap::COL_DISAMBIGUATION)) {
            $modifiedColumns[':p' . $index++]  = 'disambiguation';
        }
        if ($this->isColumnModified(PageTableMap::COL_DEFAULTSORT)) {
            $modifiedColumns[':p' . $index++]  = 'defaultsort';
        }
        if ($this->isColumnModified(PageTableMap::COL_CREATED_AT)) {
            $modifiedColumns[':p' . $index++]  = 'created_at';
        }
        if ($this->isColumnModified(PageTableMap::COL_UPDATED_AT)) {
            $modifiedColumns[':p' . $index++]  = 'updated_at';
        }

        $sql = sprintf(
            'INSERT INTO page (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case 'id':
                        $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
                        break;
                    case 'source_id':
                        $stmt->bindValue($identifier, $this->source_id, PDO::PARAM_INT);
                        break;
                    case 'pageid':
                        $stmt->bindValue($identifier, $this->pageid, PDO::PARAM_INT);
                        break;
                    case 'title':
                        $stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
                        break;
                    case 'displaytitle':
                        $stmt->bindValue($identifier, $this->displaytitle, PDO::PARAM_STR);
                        break;
                    case 'page_image_free':
                        $stmt->bindValue($identifier, $this->page_image_free, PDO::PARAM_STR);
                        break;
                    case 'wikibase_item':
                        $stmt->bindValue($identifier, $this->wikibase_item, PDO::PARAM_STR);
                        break;
                    case 'disambiguation':
                        $stmt->bindValue($identifier, $this->disambiguation, PDO::PARAM_STR);
                        break;
                    case 'defaultsort':
                        $stmt->bindValue($identifier, $this->defaultsort, PDO::PARAM_STR);
                        break;
                    case 'created_at':
                        $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
                        break;
                    case 'updated_at':
                        $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);
        }

        try {
            $pk = $con->lastInsertId();
        } catch (Exception $e) {
            throw new PropelException('Unable to get autoincrement id.', 0, $e);
        }
        $this->setId($pk);

        $this->setNew(false);
    }
32440
public function getDealerAdmin(ConnectionInterface $con = null)
    {
        if ($this->aDealerAdmin === null && ($this->id !== null)) {
            $this->aDealerAdmin = ChildDealerAdminQuery::create()->findPk($this->id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aDealerAdmin->addDealerAdminVersions($this);
             */
        }

        return $this->aDealerAdmin;
    }
784762
protected function doInsert(ConnectionInterface $con)
    {
        $modifiedColumns = array();
        $index = 0;

        $this->modifiedColumns[SportTableMap::COL_ID] = true;
        if (null !== $this->id) {
            throw new PropelException('Cannot insert a value for auto-increment primary key (' . SportTableMap::COL_ID . ')');
        }

         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(SportTableMap::COL_ID)) {
            $modifiedColumns[':p' . $index++]  = '`id`';
        }
        if ($this->isColumnModified(SportTableMap::COL_TITLE)) {
            $modifiedColumns[':p' . $index++]  = '`title`';
        }
        if ($this->isColumnModified(SportTableMap::COL_SLUG)) {
            $modifiedColumns[':p' . $index++]  = '`slug`';
        }
        if ($this->isColumnModified(SportTableMap::COL_ATHLETE_LABEL)) {
            $modifiedColumns[':p' . $index++]  = '`athlete_label`';
        }
        if ($this->isColumnModified(SportTableMap::COL_OBJECT_SLUG)) {
            $modifiedColumns[':p' . $index++]  = '`object_slug`';
        }
        if ($this->isColumnModified(SportTableMap::COL_OBJECT_LABEL)) {
            $modifiedColumns[':p' . $index++]  = '`object_label`';
        }
        if ($this->isColumnModified(SportTableMap::COL_OBJECT_PLURAL_LABEL)) {
            $modifiedColumns[':p' . $index++]  = '`object_plural_label`';
        }
        if ($this->isColumnModified(SportTableMap::COL_SKILL_SLUG)) {
            $modifiedColumns[':p' . $index++]  = '`skill_slug`';
        }
        if ($this->isColumnModified(SportTableMap::COL_SKILL_LABEL)) {
            $modifiedColumns[':p' . $index++]  = '`skill_label`';
        }
        if ($this->isColumnModified(SportTableMap::COL_SKILL_PLURAL_LABEL)) {
            $modifiedColumns[':p' . $index++]  = '`skill_plural_label`';
        }
        if ($this->isColumnModified(SportTableMap::COL_SKILL_PICTURE_URL)) {
            $modifiedColumns[':p' . $index++]  = '`skill_picture_url`';
        }
        if ($this->isColumnModified(SportTableMap::COL_GROUP_SLUG)) {
            $modifiedColumns[':p' . $index++]  = '`group_slug`';
        }
        if ($this->isColumnModified(SportTableMap::COL_GROUP_LABEL)) {
            $modifiedColumns[':p' . $index++]  = '`group_label`';
        }
        if ($this->isColumnModified(SportTableMap::COL_GROUP_PLURAL_LABEL)) {
            $modifiedColumns[':p' . $index++]  = '`group_plural_label`';
        }
        if ($this->isColumnModified(SportTableMap::COL_TRANSITION_LABEL)) {
            $modifiedColumns[':p' . $index++]  = '`transition_label`';
        }
        if ($this->isColumnModified(SportTableMap::COL_TRANSITION_PLURAL_LABEL)) {
            $modifiedColumns[':p' . $index++]  = '`transition_plural_label`';
        }
        if ($this->isColumnModified(SportTableMap::COL_TRANSITIONS_SLUG)) {
            $modifiedColumns[':p' . $index++]  = '`transitions_slug`';
        }
        if ($this->isColumnModified(SportTableMap::COL_POSITION_SLUG)) {
            $modifiedColumns[':p' . $index++]  = '`position_slug`';
        }
        if ($this->isColumnModified(SportTableMap::COL_POSITION_LABEL)) {
            $modifiedColumns[':p' . $index++]  = '`position_label`';
        }
        if ($this->isColumnModified(SportTableMap::COL_FEATURE_COMPOSITION)) {
            $modifiedColumns[':p' . $index++]  = '`feature_composition`';
        }
        if ($this->isColumnModified(SportTableMap::COL_FEATURE_TESTER)) {
            $modifiedColumns[':p' . $index++]  = '`feature_tester`';
        }
        if ($this->isColumnModified(SportTableMap::COL_IS_DEFAULT)) {
            $modifiedColumns[':p' . $index++]  = '`is_default`';
        }

        $sql = sprintf(
            'INSERT INTO `kk_trixionary_sport` (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case '`id`':
                        $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
                        break;
                    case '`title`':
                        $stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
                        break;
                    case '`slug`':
                        $stmt->bindValue($identifier, $this->slug, PDO::PARAM_STR);
                        break;
                    case '`athlete_label`':
                        $stmt->bindValue($identifier, $this->athlete_label, PDO::PARAM_STR);
                        break;
                    case '`object_slug`':
                        $stmt->bindValue($identifier, $this->object_slug, PDO::PARAM_STR);
                        break;
                    case '`object_label`':
                        $stmt->bindValue($identifier, $this->object_label, PDO::PARAM_STR);
                        break;
                    case '`object_plural_label`':
                        $stmt->bindValue($identifier, $this->object_plural_label, PDO::PARAM_STR);
                        break;
                    case '`skill_slug`':
                        $stmt->bindValue($identifier, $this->skill_slug, PDO::PARAM_STR);
                        break;
                    case '`skill_label`':
                        $stmt->bindValue($identifier, $this->skill_label, PDO::PARAM_STR);
                        break;
                    case '`skill_plural_label`':
                        $stmt->bindValue($identifier, $this->skill_plural_label, PDO::PARAM_STR);
                        break;
                    case '`skill_picture_url`':
                        $stmt->bindValue($identifier, $this->skill_picture_url, PDO::PARAM_STR);
                        break;
                    case '`group_slug`':
                        $stmt->bindValue($identifier, $this->group_slug, PDO::PARAM_STR);
                        break;
                    case '`group_label`':
                        $stmt->bindValue($identifier, $this->group_label, PDO::PARAM_STR);
                        break;
                    case '`group_plural_label`':
                        $stmt->bindValue($identifier, $this->group_plural_label, PDO::PARAM_STR);
                        break;
                    case '`transition_label`':
                        $stmt->bindValue($identifier, $this->transition_label, PDO::PARAM_STR);
                        break;
                    case '`transition_plural_label`':
                        $stmt->bindValue($identifier, $this->transition_plural_label, PDO::PARAM_STR);
                        break;
                    case '`transitions_slug`':
                        $stmt->bindValue($identifier, $this->transitions_slug, PDO::PARAM_STR);
                        break;
                    case '`position_slug`':
                        $stmt->bindValue($identifier, $this->position_slug, PDO::PARAM_STR);
                        break;
                    case '`position_label`':
                        $stmt->bindValue($identifier, $this->position_label, PDO::PARAM_STR);
                        break;
                    case '`feature_composition`':
                        $stmt->bindValue($identifier, (int) $this->feature_composition, PDO::PARAM_INT);
                        break;
                    case '`feature_tester`':
                        $stmt->bindValue($identifier, (int) $this->feature_tester, PDO::PARAM_INT);
                        break;
                    case '`is_default`':
                        $stmt->bindValue($identifier, (int) $this->is_default, PDO::PARAM_INT);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);
        }

        try {
            $pk = $con->lastInsertId();
        } catch (Exception $e) {
            throw new PropelException('Unable to get autoincrement id.', 0, $e);
        }
        $this->setId($pk);

        $this->setNew(false);
    }
798210
public function getPersonFunction(ConnectionInterface $con = null)
    {
        if ($this->aPersonFunction === null && ($this->id !== null)) {
            $this->aPersonFunction = ChildPersonFunctionQuery::create()->findPk($this->id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aPersonFunction->addPersonFunctionI18ns($this);
             */
        }

        return $this->aPersonFunction;
    }
1342678
protected function doInsert(ConnectionInterface $con)
    {
        $modifiedColumns = array();
        $index = 0;


         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(M2PTableMap::COL_MEDIA_ID)) {
            $modifiedColumns[':p' . $index++]  = 'media_id';
        }
        if ($this->isColumnModified(M2PTableMap::COL_PAGE_ID)) {
            $modifiedColumns[':p' . $index++]  = 'page_id';
        }

        $sql = sprintf(
            'INSERT INTO m2p (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case 'media_id':
                        $stmt->bindValue($identifier, $this->media_id, PDO::PARAM_INT);
                        break;
                    case 'page_id':
                        $stmt->bindValue($identifier, $this->page_id, PDO::PARAM_INT);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);
        }

        $this->setNew(false);
    }
528684
protected function doInsert(ConnectionInterface $con)
    {
        $modifiedColumns = array();
        $index = 0;

        $this->modifiedColumns[CategoryTableMap::COL_ID] = true;
        if (null !== $this->id) {
            throw new PropelException('Cannot insert a value for auto-increment primary key (' . CategoryTableMap::COL_ID . ')');
        }

         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(CategoryTableMap::COL_ID)) {
            $modifiedColumns[':p' . $index++]  = 'id';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_SOURCE_ID)) {
            $modifiedColumns[':p' . $index++]  = 'source_id';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_PAGEID)) {
            $modifiedColumns[':p' . $index++]  = 'pageid';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_TITLE)) {
            $modifiedColumns[':p' . $index++]  = 'title';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_FILES)) {
            $modifiedColumns[':p' . $index++]  = 'files';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_SUBCATS)) {
            $modifiedColumns[':p' . $index++]  = 'subcats';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_PAGES)) {
            $modifiedColumns[':p' . $index++]  = 'pages';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_SIZE)) {
            $modifiedColumns[':p' . $index++]  = 'size';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_HIDDEN)) {
            $modifiedColumns[':p' . $index++]  = 'hidden';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_CREATED_AT)) {
            $modifiedColumns[':p' . $index++]  = 'created_at';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_UPDATED_AT)) {
            $modifiedColumns[':p' . $index++]  = 'updated_at';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_TREE_LEFT)) {
            $modifiedColumns[':p' . $index++]  = 'tree_left';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_TREE_RIGHT)) {
            $modifiedColumns[':p' . $index++]  = 'tree_right';
        }
        if ($this->isColumnModified(CategoryTableMap::COL_TREE_LEVEL)) {
            $modifiedColumns[':p' . $index++]  = 'tree_level';
        }

        $sql = sprintf(
            'INSERT INTO category (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case 'id':
                        $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
                        break;
                    case 'source_id':
                        $stmt->bindValue($identifier, $this->source_id, PDO::PARAM_INT);
                        break;
                    case 'pageid':
                        $stmt->bindValue($identifier, $this->pageid, PDO::PARAM_INT);
                        break;
                    case 'title':
                        $stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
                        break;
                    case 'files':
                        $stmt->bindValue($identifier, $this->files, PDO::PARAM_INT);
                        break;
                    case 'subcats':
                        $stmt->bindValue($identifier, $this->subcats, PDO::PARAM_INT);
                        break;
                    case 'pages':
                        $stmt->bindValue($identifier, $this->pages, PDO::PARAM_INT);
                        break;
                    case 'size':
                        $stmt->bindValue($identifier, $this->size, PDO::PARAM_INT);
                        break;
                    case 'hidden':
                        $stmt->bindValue($identifier, $this->hidden, PDO::PARAM_BOOL);
                        break;
                    case 'created_at':
                        $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
                        break;
                    case 'updated_at':
                        $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s.u") : null, PDO::PARAM_STR);
                        break;
                    case 'tree_left':
                        $stmt->bindValue($identifier, $this->tree_left, PDO::PARAM_INT);
                        break;
                    case 'tree_right':
                        $stmt->bindValue($identifier, $this->tree_right, PDO::PARAM_INT);
                        break;
                    case 'tree_level':
                        $stmt->bindValue($identifier, $this->tree_level, PDO::PARAM_INT);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);
        }

        try {
            $pk = $con->lastInsertId();
        } catch (Exception $e) {
            throw new PropelException('Unable to get autoincrement id.', 0, $e);
        }
        $this->setId($pk);

        $this->setNew(false);
    }
1126622
protected function doInsert(ConnectionInterface $con)
    {
        $modifiedColumns = array();
        $index = 0;

        $this->modifiedColumns[SkillTableMap::COL_ID] = true;
        if (null !== $this->id) {
            throw new PropelException('Cannot insert a value for auto-increment primary key (' . SkillTableMap::COL_ID . ')');
        }

         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(SkillTableMap::COL_ID)) {
            $modifiedColumns[':p' . $index++]  = '`id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_SPORT_ID)) {
            $modifiedColumns[':p' . $index++]  = '`sport_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_NAME)) {
            $modifiedColumns[':p' . $index++]  = '`name`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_ALTERNATIVE_NAME)) {
            $modifiedColumns[':p' . $index++]  = '`alternative_name`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_SLUG)) {
            $modifiedColumns[':p' . $index++]  = '`slug`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_DESCRIPTION)) {
            $modifiedColumns[':p' . $index++]  = '`description`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_HISTORY)) {
            $modifiedColumns[':p' . $index++]  = '`history`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_IS_TRANSLATION)) {
            $modifiedColumns[':p' . $index++]  = '`is_translation`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_IS_ROTATION)) {
            $modifiedColumns[':p' . $index++]  = '`is_rotation`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_IS_ACYCLIC)) {
            $modifiedColumns[':p' . $index++]  = '`is_acyclic`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_IS_CYCLIC)) {
            $modifiedColumns[':p' . $index++]  = '`is_cyclic`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_LONGITUDINAL_FLAGS)) {
            $modifiedColumns[':p' . $index++]  = '`longitudinal_flags`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_LATITUDINAL_FLAGS)) {
            $modifiedColumns[':p' . $index++]  = '`latitudinal_flags`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_TRANSVERSAL_FLAGS)) {
            $modifiedColumns[':p' . $index++]  = '`transversal_flags`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_MOVEMENT_DESCRIPTION)) {
            $modifiedColumns[':p' . $index++]  = '`movement_description`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_SEQUENCE_PICTURE_URL)) {
            $modifiedColumns[':p' . $index++]  = '`sequence_picture_url`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_VARIATION_OF_ID)) {
            $modifiedColumns[':p' . $index++]  = '`variation_of_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_START_POSITION_ID)) {
            $modifiedColumns[':p' . $index++]  = '`start_position_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_END_POSITION_ID)) {
            $modifiedColumns[':p' . $index++]  = '`end_position_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_IS_COMPOSITE)) {
            $modifiedColumns[':p' . $index++]  = '`is_composite`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_IS_MULTIPLE)) {
            $modifiedColumns[':p' . $index++]  = '`is_multiple`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_MULTIPLE_OF_ID)) {
            $modifiedColumns[':p' . $index++]  = '`multiple_of_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_MULTIPLIER)) {
            $modifiedColumns[':p' . $index++]  = '`multiplier`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_GENERATION)) {
            $modifiedColumns[':p' . $index++]  = '`generation`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_IMPORTANCE)) {
            $modifiedColumns[':p' . $index++]  = '`importance`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_PICTURE_ID)) {
            $modifiedColumns[':p' . $index++]  = '`picture_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_VIDEO_ID)) {
            $modifiedColumns[':p' . $index++]  = '`video_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_TUTORIAL_ID)) {
            $modifiedColumns[':p' . $index++]  = '`tutorial_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_KSTRUKTUR_ID)) {
            $modifiedColumns[':p' . $index++]  = '`kstruktur_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_FUNCTION_PHASE_ID)) {
            $modifiedColumns[':p' . $index++]  = '`function_phase_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_OBJECT_ID)) {
            $modifiedColumns[':p' . $index++]  = '`object_id`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_VERSION)) {
            $modifiedColumns[':p' . $index++]  = '`version`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_VERSION_CREATED_AT)) {
            $modifiedColumns[':p' . $index++]  = '`version_created_at`';
        }
        if ($this->isColumnModified(SkillTableMap::COL_VERSION_COMMENT)) {
            $modifiedColumns[':p' . $index++]  = '`version_comment`';
        }

        $sql = sprintf(
            'INSERT INTO `kk_trixionary_skill` (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case '`id`':
                        $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
                        break;
                    case '`sport_id`':
                        $stmt->bindValue($identifier, $this->sport_id, PDO::PARAM_INT);
                        break;
                    case '`name`':
                        $stmt->bindValue($identifier, $this->name, PDO::PARAM_STR);
                        break;
                    case '`alternative_name`':
                        $stmt->bindValue($identifier, $this->alternative_name, PDO::PARAM_STR);
                        break;
                    case '`slug`':
                        $stmt->bindValue($identifier, $this->slug, PDO::PARAM_STR);
                        break;
                    case '`description`':
                        $stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
                        break;
                    case '`history`':
                        $stmt->bindValue($identifier, $this->history, PDO::PARAM_STR);
                        break;
                    case '`is_translation`':
                        $stmt->bindValue($identifier, (int) $this->is_translation, PDO::PARAM_INT);
                        break;
                    case '`is_rotation`':
                        $stmt->bindValue($identifier, (int) $this->is_rotation, PDO::PARAM_INT);
                        break;
                    case '`is_acyclic`':
                        $stmt->bindValue($identifier, (int) $this->is_acyclic, PDO::PARAM_INT);
                        break;
                    case '`is_cyclic`':
                        $stmt->bindValue($identifier, (int) $this->is_cyclic, PDO::PARAM_INT);
                        break;
                    case '`longitudinal_flags`':
                        $stmt->bindValue($identifier, $this->longitudinal_flags, PDO::PARAM_INT);
                        break;
                    case '`latitudinal_flags`':
                        $stmt->bindValue($identifier, $this->latitudinal_flags, PDO::PARAM_INT);
                        break;
                    case '`transversal_flags`':
                        $stmt->bindValue($identifier, $this->transversal_flags, PDO::PARAM_INT);
                        break;
                    case '`movement_description`':
                        $stmt->bindValue($identifier, $this->movement_description, PDO::PARAM_STR);
                        break;
                    case '`sequence_picture_url`':
                        $stmt->bindValue($identifier, $this->sequence_picture_url, PDO::PARAM_STR);
                        break;
                    case '`variation_of_id`':
                        $stmt->bindValue($identifier, $this->variation_of_id, PDO::PARAM_INT);
                        break;
                    case '`start_position_id`':
                        $stmt->bindValue($identifier, $this->start_position_id, PDO::PARAM_INT);
                        break;
                    case '`end_position_id`':
                        $stmt->bindValue($identifier, $this->end_position_id, PDO::PARAM_INT);
                        break;
                    case '`is_composite`':
                        $stmt->bindValue($identifier, (int) $this->is_composite, PDO::PARAM_INT);
                        break;
                    case '`is_multiple`':
                        $stmt->bindValue($identifier, (int) $this->is_multiple, PDO::PARAM_INT);
                        break;
                    case '`multiple_of_id`':
                        $stmt->bindValue($identifier, $this->multiple_of_id, PDO::PARAM_INT);
                        break;
                    case '`multiplier`':
                        $stmt->bindValue($identifier, $this->multiplier, PDO::PARAM_INT);
                        break;
                    case '`generation`':
                        $stmt->bindValue($identifier, $this->generation, PDO::PARAM_INT);
                        break;
                    case '`importance`':
                        $stmt->bindValue($identifier, $this->importance, PDO::PARAM_INT);
                        break;
                    case '`picture_id`':
                        $stmt->bindValue($identifier, $this->picture_id, PDO::PARAM_INT);
                        break;
                    case '`video_id`':
                        $stmt->bindValue($identifier, $this->video_id, PDO::PARAM_INT);
                        break;
                    case '`tutorial_id`':
                        $stmt->bindValue($identifier, $this->tutorial_id, PDO::PARAM_INT);
                        break;
                    case '`kstruktur_id`':
                        $stmt->bindValue($identifier, $this->kstruktur_id, PDO::PARAM_INT);
                        break;
                    case '`function_phase_id`':
                        $stmt->bindValue($identifier, $this->function_phase_id, PDO::PARAM_INT);
                        break;
                    case '`object_id`':
                        $stmt->bindValue($identifier, $this->object_id, PDO::PARAM_INT);
                        break;
                    case '`version`':
                        $stmt->bindValue($identifier, $this->version, PDO::PARAM_INT);
                        break;
                    case '`version_created_at`':
                        $stmt->bindValue($identifier, $this->version_created_at ? $this->version_created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
                        break;
                    case '`version_comment`':
                        $stmt->bindValue($identifier, $this->version_comment, PDO::PARAM_STR);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);
        }

        try {
            $pk = $con->lastInsertId();
        } catch (Exception $e) {
            throw new PropelException('Unable to get autoincrement id.', 0, $e);
        }
        $this->setId($pk);

        $this->setNew(false);
    }
1113096
protected function doInsert(ConnectionInterface $con)
    {
        $modifiedColumns = array();
        $index = 0;


         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(SkillGroupTableMap::COL_SKILL_ID)) {
            $modifiedColumns[':p' . $index++]  = '`skill_id`';
        }
        if ($this->isColumnModified(SkillGroupTableMap::COL_GROUP_ID)) {
            $modifiedColumns[':p' . $index++]  = '`group_id`';
        }

        $sql = sprintf(
            'INSERT INTO `kk_trixionary_skill_group` (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case '`skill_id`':
                        $stmt->bindValue($identifier, $this->skill_id, PDO::PARAM_INT);
                        break;
                    case '`group_id`':
                        $stmt->bindValue($identifier, $this->group_id, PDO::PARAM_INT);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);
        }

        $this->setNew(false);
    }
394834
public function getCategory(ConnectionInterface $con = null)
    {
        if ($this->aCategory === null && ($this->category_id != 0)) {
            $this->aCategory = ChildCategoryQuery::create()->findPk($this->category_id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aCategory->addC2Ms($this);
             */
        }

        return $this->aCategory;
    }
407668
protected function updateRelatedGroupSkillCount(ConnectionInterface $con)
    {
        if ($group = $this->getGroup()) {
            $group->updateSkillCount($con);
        }
        if ($this->oldGroupSkillCount) {
            $this->oldGroupSkillCount->updateSkillCount($con);
            $this->oldGroupSkillCount = null;
        }
    }
1044777
public function getMaxRankArray(ConnectionInterface $con = null)
    {
        if ($con === null) {
            $con = Propel::getConnection(CustomerGroupTableMap::DATABASE_NAME);
        }
        // shift the objects with a position lower than the one of object
        $this->addSelectColumn('MAX(' . CustomerGroupTableMap::RANK_COL . ')');
        $stmt = $this->doSelect($con);

        return $stmt->fetchColumn();
    }
744132
protected function doInsert(ConnectionInterface $con)
    {
        $modifiedColumns = array();
        $index = 0;

        $this->modifiedColumns[IndexEngineIndexTableMap::ID] = true;
        if (null !== $this->id) {
            throw new PropelException('Cannot insert a value for auto-increment primary key ('.IndexEngineIndexTableMap::ID.')');
        }

         // check the columns in natural order for more readable SQL queries
        if ($this->isColumnModified(IndexEngineIndexTableMap::ID)) {
            $modifiedColumns[':p'.$index++]  = 'ID';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::VISIBLE)) {
            $modifiedColumns[':p'.$index++]  = 'VISIBLE';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::CODE)) {
            $modifiedColumns[':p'.$index++]  = 'CODE';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::TITLE)) {
            $modifiedColumns[':p'.$index++]  = 'TITLE';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::TYPE)) {
            $modifiedColumns[':p'.$index++]  = 'TYPE';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::ENTITY)) {
            $modifiedColumns[':p'.$index++]  = 'ENTITY';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::SERIALIZED_COLUMNS)) {
            $modifiedColumns[':p'.$index++]  = 'SERIALIZED_COLUMNS';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::SERIALIZED_CONDITION)) {
            $modifiedColumns[':p'.$index++]  = 'SERIALIZED_CONDITION';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::INDEX_ENGINE_DRIVER_CONFIGURATION_ID)) {
            $modifiedColumns[':p'.$index++]  = 'INDEX_ENGINE_DRIVER_CONFIGURATION_ID';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::CREATED_AT)) {
            $modifiedColumns[':p'.$index++]  = 'CREATED_AT';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::UPDATED_AT)) {
            $modifiedColumns[':p'.$index++]  = 'UPDATED_AT';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::VERSION)) {
            $modifiedColumns[':p'.$index++]  = 'VERSION';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::VERSION_CREATED_AT)) {
            $modifiedColumns[':p'.$index++]  = 'VERSION_CREATED_AT';
        }
        if ($this->isColumnModified(IndexEngineIndexTableMap::VERSION_CREATED_BY)) {
            $modifiedColumns[':p'.$index++]  = 'VERSION_CREATED_BY';
        }

        $sql = sprintf(
            'INSERT INTO index_engine_index (%s) VALUES (%s)',
            implode(', ', $modifiedColumns),
            implode(', ', array_keys($modifiedColumns))
        );

        try {
            $stmt = $con->prepare($sql);
            foreach ($modifiedColumns as $identifier => $columnName) {
                switch ($columnName) {
                    case 'ID':
                        $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
                        break;
                    case 'VISIBLE':
                        $stmt->bindValue($identifier, $this->visible, PDO::PARAM_INT);
                        break;
                    case 'CODE':
                        $stmt->bindValue($identifier, $this->code, PDO::PARAM_STR);
                        break;
                    case 'TITLE':
                        $stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
                        break;
                    case 'TYPE':
                        $stmt->bindValue($identifier, $this->type, PDO::PARAM_STR);
                        break;
                    case 'ENTITY':
                        $stmt->bindValue($identifier, $this->entity, PDO::PARAM_STR);
                        break;
                    case 'SERIALIZED_COLUMNS':
                        $stmt->bindValue($identifier, $this->serialized_columns, PDO::PARAM_STR);
                        break;
                    case 'SERIALIZED_CONDITION':
                        $stmt->bindValue($identifier, $this->serialized_condition, PDO::PARAM_STR);
                        break;
                    case 'INDEX_ENGINE_DRIVER_CONFIGURATION_ID':
                        $stmt->bindValue($identifier, $this->index_engine_driver_configuration_id, PDO::PARAM_INT);
                        break;
                    case 'CREATED_AT':
                        $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
                        break;
                    case 'UPDATED_AT':
                        $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
                        break;
                    case 'VERSION':
                        $stmt->bindValue($identifier, $this->version, PDO::PARAM_INT);
                        break;
                    case 'VERSION_CREATED_AT':
                        $stmt->bindValue($identifier, $this->version_created_at ? $this->version_created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
                        break;
                    case 'VERSION_CREATED_BY':
                        $stmt->bindValue($identifier, $this->version_created_by, PDO::PARAM_STR);
                        break;
                }
            }
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e);
        }

        try {
            $pk = $con->lastInsertId();
        } catch (Exception $e) {
            throw new PropelException('Unable to get autoincrement id.', 0, $e);
        }
        $this->setId($pk);

        $this->setNew(false);
    }
1027259
public function getSkillRelatedByCompositeId(ConnectionInterface $con = null)
    {
        if ($this->aSkillRelatedByCompositeId === null && ($this->composite_id !== null)) {
            $this->aSkillRelatedByCompositeId = ChildSkillQuery::create()->findPk($this->composite_id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aSkillRelatedByCompositeId->addComposites($this);
             */
        }

        return $this->aSkillRelatedByCompositeId;
    }
392729
public function delete(ConnectionInterface $con = null)
    {
        if ($this->isDeleted()) {
            throw new PropelException("This object has already been deleted.");
        }

        if ($con === null) {
            $con = Propel::getServiceContainer()->getWriteConnection(CategoryTableMap::DATABASE_NAME);
        }

        $con->transaction(function () use ($con) {
            $deleteQuery = ChildCategoryQuery::create()
                ->filterByPrimaryKey($this->getPrimaryKey());
            $ret = $this->preDelete($con);
            // nested_set behavior
            if ($this->isRoot()) {
                throw new PropelException('Deletion of a root node is disabled for nested sets. Use ChildCategoryQuery::deleteTree() instead to delete an entire tree');
            }

            if ($this->isInTree()) {
                $this->deleteDescendants($con);
            }

            if ($ret) {
                $deleteQuery->delete($con);
                $this->postDelete($con);
                // nested_set behavior
                if ($this->isInTree()) {
                    // fill up the room that was used by the node
                    ChildCategoryQuery::shiftRLValues(-2, $this->getRightValue() + 1, null, $con);
                }

                $this->setDeleted(true);
            }
        });
    }