Model/Base/CustomerGroup.php
public function getCustomers($criteria = null, ConnectionInterface $con = null)
    {
        if (null === $this->collCustomers || null !== $criteria) {
            if ($this->isNew() && null === $this->collCustomers) {
                // return empty collection
                $this->initCustomers();
            } else {
                $collCustomers = CustomerQuery::create(null, $criteria)
                    ->filterByCustomerGroup($this)
                    ->find($con);
                if (null !== $criteria) {
                    return $collCustomers;
                }
                $this->collCustomers = $collCustomers;
            }
        }

        return $this->collCustomers;
    }
public function getCustomers($criteria = null, ConnectionInterface $con = null)
    {
        if (null === $this->collCustomers || null !== $criteria) {
            if ($this->isNew() && null === $this->collCustomers) {
                // return empty collection
                $this->initCustomers();
            } else {
                $collCustomers = CustomerQuery::create(null, $criteria)
                    ->filterByCustomerGroup($this)
                    ->find($con);
                if (null !== $criteria) {
                    return $collCustomers;
                }
                $this->collCustomers = $collCustomers;
            }
        }

        return $this->collCustomers;
    }
public function getCustomers ( $ criteria = null , ConnectionInterface $ con = null ) { if ( null === $ this -> collCustomers || null !== $ criteria ) { if ( $ this -> isNew ( ) && null === $ this -> collCustomers ) { // return empty collection $ this -> initCustomers ( ) ; } else { $ collCustomers = CustomerQuery :: create ( null , $ criteria ) -> filterByCustomerGroup ( $ this ) -> find ( $ con ) ; if ( null !== $ criteria ) { return $ collCustomers ; } $ this -> collCustomers = $ collCustomers ; } } return $ this -> collCustomers ; }
Gets a collection of ChildCustomer objects related by a many-to-many relationship
to the current object by way of the customer_customer_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 ChildCustomerGroup 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|ChildCustomer[] List of ChildCustomer objects
Gets a collection of ChildCustomer objects related by a many - to - many relationship to the current object by way of the customer_customer_group cross - reference table .