php
There is no column with name 'tid' on table 'product'
When I try to validate my database I get this error; Does anyone how this error works? c:\xampp\htdocs\Oefentoets>php bin/console doctrine:schema:validate [Mapping] OK - The mapping files are correct. [Doctrine\DBAL\Schema\SchemaException] There is no column with name 'tid' on table 'product'. This is my code; I have tried re-adding it(with command prompt), renaming it(manually, in MySQL and in the code itself). Everything. Nothing changes. namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * product * * #ORM\Table(name="product") * #ORM\Entity(repositoryClass="AppBundle\Repository\productRepository") */ class product { /** * #var int * * #ORM\Column(name="tid", type="integer", unique=true) * #ORM\Id * #ORM\GeneratedValue(strategy="AUTO") */ private $tid; /** * #ORM\ManyToOne(targetEntity="categorie", inversedBy="producten") * #ORM\JoinColumn(name="categorie", referencedColumnName="id") */ private $categorie; /** * #var string * * #ORM\Column(name="naam", type="string", length=100) */ private $naam; /** * #var string * * #ORM\Column(name="merk", type="string", length=100) */ private $merk; /** * #var string * * #ORM\Column(name="inkoopprijs", type="decimal", precision=10, scale=0) */ private $inkoopprijs; /** * Set tid * * #param integer $tid * * #return product */ public function setTid($tid) { $this->tid = $tid; return $this; } /** * Get tid * * #return int */ public function getTid() { return $this->tid; } /** * Set naam * * #param string $naam * * #return product */ public function setNaam($naam) { $this->naam = $naam; return $this; } /** * Get naam * * #return string */ public function getNaam() { return $this->naam; } /** * Set merk * * #param string $merk * * #return product */ public function setMerk($merk) { $this->merk = $merk; return $this; } /** * Get merk * * #return string */ public function getMerk() { return $this->merk; } /** * Set inkoopprijs * * #param string $inkoopprijs * * #return product */ public function setInkoopprijs($inkoopprijs) { $this->inkoopprijs = $inkoopprijs; return $this; } /** * Get inkoopprijs * * #return string */ public function getInkoopprijs() { return $this->inkoopprijs; } /** * Set categorie * * #param string $categorie * * #return product */ public function setCategorie($categorie) { $this->categorie = $categorie; return $this; } /** * Get categorie * * #return string */ public function getCategorie() { return $this->categorie; } }
Try php bin/console doctrine:schema:update --dump-sql
Related Links
Too many connections are used for insert data in mysql
mySQL Syntax Issues [closed]
error in form submission without image
Php session fixation example and fixes
the filename .xls is not readable
Product availability checking
Disable security firewall in test environment on Symfony2
PHP Query Breaking
Including codeigniter from a normal PHP file?
PHP form that goes thru the day collecting data with a progress bar
Calling classes from all other classes - PHP
Render additional html at the beggining or end of action view
echoing thumbnails that link to the larger image
shorter url with php
How to integrate messages or outputs from Model layer into a templated page
php curl - accessing url with http authentication (need help)