src/model/Base/Skill.php
public function getGroups(Criteria $criteria = null, ConnectionInterface $con = null)
    {
        $partial = $this->collGroupsPartial && !$this->isNew();
        if (null === $this->collGroups || null !== $criteria || $partial) {
            if ($this->isNew()) {
                // return empty collection
                if (null === $this->collGroups) {
                    $this->initGroups();
                }
            } else {

                $query = ChildGroupQuery::create(null, $criteria)
                    ->filterBySkill($this);
                $collGroups = $query->find($con);
                if (null !== $criteria) {
                    return $collGroups;
                }

                if ($partial && $this->collGroups) {
                    //make sure that already added objects gets added to the list of the database.
                    foreach ($this->collGroups as $obj) {
                        if (!$collGroups->contains($obj)) {
                            $collGroups[] = $obj;
                        }
                    }
                }

                $this->collGroups = $collGroups;
                $this->collGroupsPartial = false;
            }
        }

        return $this->collGroups;
    }
public function getGroups(Criteria $criteria = null, ConnectionInterface $con = null)
    {
        $partial = $this->collGroupsPartial && !$this->isNew();
        if (null === $this->collGroups || null !== $criteria || $partial) {
            if ($this->isNew()) {
                // return empty collection
                if (null === $this->collGroups) {
                    $this->initGroups();
                }
            } else {

                $query = ChildGroupQuery::create(null, $criteria)
                    ->filterBySkill($this);
                $collGroups = $query->find($con);
                if (null !== $criteria) {
                    return $collGroups;
                }

                if ($partial && $this->collGroups) {
                    //make sure that already added objects gets added to the list of the database.
                    foreach ($this->collGroups as $obj) {
                        if (!$collGroups->contains($obj)) {
                            $collGroups[] = $obj;
                        }
                    }
                }

                $this->collGroups = $collGroups;
                $this->collGroupsPartial = false;
            }
        }

        return $this->collGroups;
    }
public function getGroups ( Criteria $ criteria = null , ConnectionInterface $ con = null ) { $ partial = $ this -> collGroupsPartial && ! $ this -> isNew ( ) ; if ( null === $ this -> collGroups || null !== $ criteria || $ partial ) { if ( $ this -> isNew ( ) ) { // return empty collection if ( null === $ this -> collGroups ) { $ this -> initGroups ( ) ; } } else { $ query = ChildGroupQuery :: create ( null , $ criteria ) -> filterBySkill ( $ this ) ; $ collGroups = $ query -> find ( $ con ) ; if ( null !== $ criteria ) { return $ collGroups ; } if ( $ partial && $ this -> collGroups ) { //make sure that already added objects gets added to the list of the database. foreach ( $ this -> collGroups as $ obj ) { if ( ! $ collGroups -> contains ( $ obj ) ) { $ collGroups [ ] = $ obj ; } } } $ this -> collGroups = $ collGroups ; $ this -> collGroupsPartial = false ; } } return $ this -> collGroups ; }
Gets a collection of ChildGroup objects related by a many-to-many relationship
to the current object by way of the kk_trixionary_skill_group cross-reference table.

If the $criteria is not null, it is used to always fetch the results from the database.
Otherwise the results are fetched from the database the first time, then cached.
Next time the same method is called without $criteria, the cached collection is returned.
If this ChildSkill is new, it will return
an empty collection or the current collection; the criteria is ignored on a new object.

@param      Criteria $criteria Optional query object to filter the query
@param      ConnectionInterface $con Optional connection object

@return ObjectCollection|ChildGroup[] List of ChildGroup objects
Gets a collection of ChildGroup objects related by a many - to - many relationship to the current object by way of the kk_trixionary_skill_group cross - reference table .