I do have a really weird problem and searched&tried different approaches. As my title states my Entities (with all of them!) are not working - mean their cant mapped.
Ill come fast to the point:
Extension Array
Array ( [0] => Core [1] => date [2] => ereg [3] => libxml [4] => openssl [5] => pcre [6] => sqlite3 [7] => zlib [8] => bcmath [9] => bz2 [10] => calendar [11] => ctype [12] => curl [13] => dba [14] => dom [15] => hash [16] => fileinfo [17] => filter [18] => ftp [19] => gd [20] => gettext [21] => gmp [22] => SPL [23] => iconv [24] => session [25] => intl [26] => json [27] => ldap [28] => mbstring [29] => mcrypt [30] => mssql [31] => mysql [32] => standard [33] => PDO [34] => pdo_dblib [35] => mysqlnd [36] => pdo_sqlite [37] => pgsql [38] => apc [39] => posix [40] => Reflection [41] => imap [42] => shmop [43] => SimpleXML [44] => snmp [45] => soap [46] => sockets [47] => pdo_mysql [48] => exif [49] => sysvmsg [50] => sysvsem [51] => sysvshm [52] => tidy [53] => tokenizer [54] => wddx [55] => xml [56] => xmlreader [57] => xmlrpc [58] => xmlwriter [59] => xsl [60] => zip [61] => mysqli [62] => apache2handler [63] => Phar [64] => mhash )
So far with I came up with and tried to fix:
- APC on (no eAcc which mostly caused the problem) REF:("Class XXX is not a valid entity or mapped super class" after moving the class in the filesystem)
- Delete the Doctrine Folder in Resources, cleared the cache. No sucess.
- Addded full namespaces to the config ORM's entity // change: "company" to "x/basebundle/entity/company" doesn't worked so reverted changes.
- I Do no use annoations, Iam using yml.
- Auto Mapping is true!
Resources/Config/Doctrine/Websites.orm.yml
takes the entity class as first argument:
Brenne\BaseBundle\Entity\Website:
type: entity
table: website
repositoryClass: Brenne\BaseBundle\Repository\WebsiteRepository
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
name:
type: string
length: 110
nullable: true
url:
type: string
length: 255
nullable: true
logo:
type: string
length: 255
nullable: true
description:
type: text
oneToMany:
assignedPing:
targetEntity: ping
mappedBy: website
manyToOne:
company:
targetEntity: Company
inversedBy: website
/Entity/Websites.orm.yml
takes the entity class as first argument:
<?php
namespace Brenne\BaseBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Website
*/
class Website
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var string
*/
private $url;
/**
* @var string
*/
private $logo;
/**
* @var string
*/
private $description;
/**
* @var \Doctrine\Common\Collections\Collection
*/
private $assignedPing;
/**
* @var \Brenne\BaseBundle\Entity\Company
*/
private $company;
/**
* Constructor
*/
public function __construct()
{
$this->assignedPing = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
* @return Website
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set url
*
* @param string $url
* @return Website
*/
public function setUrl($url)
{
$this->url = $url;
return $this;
}
/**
* Get url
*
* @return string
*/
public function getUrl()
{
return $this->url;
}
/**
* Set logo
*
* @param string $logo
* @return Website
*/
public function setLogo($logo)
{
$this->logo = $logo;
return $this;
}
/**
* Get logo
*
* @return string
*/
public function getLogo()
{
return $this->logo;
}
/**
* Set description
*
* @param string $description
* @return Website
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Add assignedPing
*
* @param \Brenne\BaseBundle\Entity\ping $assignedPing
* @return Website
*/
public function addAssignedPing(\Brenne\BaseBundle\Entity\ping $assignedPing)
{
$this->assignedPing[] = $assignedPing;
return $this;
}
/**
* Remove assignedPing
*
* @param \Brenne\BaseBundle\Entity\ping $assignedPing
*/
public function removeAssignedPing(\Brenne\BaseBundle\Entity\ping $assignedPing)
{
$this->assignedPing->removeElement($assignedPing);
}
/**
* Get assignedPing
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getAssignedPing()
{
return $this->assignedPing;
}
/**
* Set company
*
* @param \Brenne\BaseBundle\Entity\Company $company
* @return Website
*/
public function setCompany(\Brenne\BaseBundle\Entity\Company $company = null)
{
$this->company = $company;
return $this;
}
/**
* Get company
*
* @return \Brenne\BaseBundle\Entity\Company
*/
public function getCompany()
{
return $this->company;
}
}
I dont know anyhting else to do, may you come up with an idea! Thanks for your time.