public function getReferences(Criteria $criteria = null, ConnectionInterface $con = null)
    {
        $partial = $this->collReferencesPartial && !$this->isNew();
        if (null === $this->collReferences || null !== $criteria || $partial) {
            if ($this->isNew()) {
                // return empty collection
                if (null === $this->collReferences) {
                    $this->initReferences();
                }
            } else {

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

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

                $this->collReferences = $collReferences;
                $this->collReferencesPartial = false;
            }
        }

        return $this->collReferences;
    }