. */ #namespace Doctrine::ORM::Exceptions; /** * Doctrine_Entity_Exception * * @package Doctrine * @subpackage Entity * @author Konsta Vesterinen * @author Roman Borschel * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.org * @since 2.0 * @version $Revision$ */ class Doctrine_ORM_Exceptions_EntityException extends Doctrine_ORM_Exceptions_ORMException { public static function unknownField($field) { return new self("Undefined field: '$field'."); } public static function invalidValueForOneToManyReference() { return new self("Invalid value. The value of a reference in a OneToMany " . "association must be a Collection."); } public static function invalidValueForOneToOneReference() { return new self("Invalid value. The value of a reference in a OneToOne " . "association must be an Entity."); } public static function invalidValueForManyToManyReference() { return new self("Invalid value. The value of a reference in a ManyToMany " . "association must be a Collection."); } public static function invalidField($field) { return new self("Invalid field: '$field'."); } }