/** * Get the associated Energyaction object * * @param PropelPDO Optional Connection object. * @return Energyaction The associated Energyaction object. * @throws PropelException */ public function getEnergyaction(PropelPDO $con = null) { if ($this->aEnergyaction === null && $this->energyaction_id !== null) { $c = new Criteria(EnergyactionPeer::DATABASE_NAME); $c->add(EnergyactionPeer::ID, $this->energyaction_id); $this->aEnergyaction = EnergyactionPeer::doSelectOne($c, $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->aEnergyaction->addRoomHasEnergyactions($this); */ } return $this->aEnergyaction; }