public function preInsert(PropelPDO $con = null) { if ($this->alreadyInSave) { return parent::preInsert($con); } if ($this->getSystemName()) { $existingConversionProfile = conversionProfile2Peer::retrieveByPartnerIdAndSystemName($this->getPartnerId(), $this->getSystemName(), $this->getType()); if ($existingConversionProfile) { throw new kCoreException("Conversion profile with system name [" . $this->getSystemName() . "] already exists"); } } return parent::preInsert($con); }