public function getAttributeTypeAvMetas($criteria = null, ConnectionInterface $con = null)
    {
        $partial = $this->collAttributeTypeAvMetasPartial && !$this->isNew();
        if (null === $this->collAttributeTypeAvMetas || null !== $criteria  || $partial) {
            if ($this->isNew() && null === $this->collAttributeTypeAvMetas) {
                // return empty collection
                $this->initAttributeTypeAvMetas();
            } else {
                $collAttributeTypeAvMetas = ChildAttributeTypeAvMetaQuery::create(null, $criteria)
                    ->filterByAttributeAttributeType($this)
                    ->find($con);

                if (null !== $criteria) {
                    if (false !== $this->collAttributeTypeAvMetasPartial && count($collAttributeTypeAvMetas)) {
                        $this->initAttributeTypeAvMetas(false);

                        foreach ($collAttributeTypeAvMetas as $obj) {
                            if (false == $this->collAttributeTypeAvMetas->contains($obj)) {
                                $this->collAttributeTypeAvMetas->append($obj);
                            }
                        }

                        $this->collAttributeTypeAvMetasPartial = true;
                    }

                    reset($collAttributeTypeAvMetas);

                    return $collAttributeTypeAvMetas;
                }

                if ($partial && $this->collAttributeTypeAvMetas) {
                    foreach ($this->collAttributeTypeAvMetas as $obj) {
                        if ($obj->isNew()) {
                            $collAttributeTypeAvMetas[] = $obj;
                        }
                    }
                }

                $this->collAttributeTypeAvMetas = $collAttributeTypeAvMetas;
                $this->collAttributeTypeAvMetasPartial = false;
            }
        }

        return $this->collAttributeTypeAvMetas;
    }