Anybody knows how to accomplish a OneToMany
relation within 2 projects (let's say cross-database wise, both have their own project structure, namespaces and database).
Let's say I have one Entity in Project A:
Movie.php (Entity Project A)
class Movie {
// ... some other properties
/**
* @ORM\OneToMany(targetEntity="Moviechild/Project B", mappedBy="movie")
*/
protected $moviechilds;
// ...
and another Entity in Project B:
Moviechild.php (Entity Project B)
class Moviechild {
// ...
/**
* @ORM\ManyToOne(targetEntity="Movie/Project A", inversedBy="moviechilds")
* @ORM\JoinColumn(name="movie_id", referencedColumnName="id")
*/
protected $movie;
// ...