I am having two entities A and B. Let's say entity A has a primary key 'foo' and the entity B has a variable named 'bar'. I am trying to establish the "Many to one" association between these two. And when i run "update schema" command on my terminal, it is giving me this result:
"Nothing to update - your database is already in sync with the current entity metadata."
here's the code:
class A
{
/**
* @var int
* @ORM\Column(name="foo", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\ManyToOne(targetEntity="B", inversedBy="bar")
*/
private $foo;
}
and
class B
{
/**
* @var int
* @ORM\Column(name="bar", type="integer")
* @ORM\OneToMany(targetEntity="A", mappedBy="foo")
*/
private $bar;
}