/** * Get the associated ChildExpertGroup object * * @param ConnectionInterface $con Optional Connection object. * @return ChildExpertGroup The associated ChildExpertGroup object. * @throws PropelException */ public function getExpertGroup(ConnectionInterface $con = null) { if ($this->aExpertGroup === null && ($this->group_name !== "" && $this->group_name !== null)) { $this->aExpertGroup = ChildExpertGroupQuery::create()->findPk($this->group_name, $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->aExpertGroup->addExpertGroupMemberss($this); */ } return $this->aExpertGroup; }
/** * Removes this object from datastore and sets delete attribute. * * @param ConnectionInterface $con * @return void * @throws PropelException * @see ExpertGroup::setDeleted() * @see ExpertGroup::isDeleted() */ 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(ExpertGroupTableMap::DATABASE_NAME); } $con->transaction(function () use($con) { $deleteQuery = ChildExpertGroupQuery::create()->filterByPrimaryKey($this->getPrimaryKey()); $ret = $this->preDelete($con); if ($ret) { $deleteQuery->delete($con); $this->postDelete($con); $this->setDeleted(true); } }); }