/** * Convenience method to delete all association to another object without invoking the * GenericORMapper directly. * * @param string $relationName The relation to create. * * @throws GenericORMapperException In case the data component is not initialized. * * @author Christian Achatz, Ralf Schubert * @version * Version 0.1, 30.10.2010<br /> */ public function deleteAssociations($relationName) { // check weather data component is there if ($this->dataComponent === null) { throw new GenericORMapperException('[GenericDomainObject::deleteAssociations()] ' . 'The data component is not initialized, so related objects cannot be loaded! ' . 'Please use the or mapper\'s createAssociation() method or call ' . 'setDataComponent($orm), where $orm is an instance of the or mapper, on this ' . 'object first!', E_USER_ERROR); } // delete associations as desired $this->dataComponent->deleteAssociations($relationName, $this); }