'Doctrine Fatal Error connecting with MySQL
im working with Doctrine for the first time and Im trying to connect with my DB in MySQL. It works perfectly inserting or deleting registers of the tables but when Im trying to take registers that are connected between two different tables, it throws me the next fatal error: Warning: require(C:\Users\34600\AppData\Local\Temp__CG__Team.php): failed to open stream: No such file or directory in C:\xampp\htdocs\xampp\Doctrine\vendor\doctrine\common\lib\Doctrine\Common\Proxy\AbstractProxyFactory.php on line 197
My two tables are called Team and Player: Both tables are connected: Player has a FK (team) from Team (id) so my code is:
require_once "Doctrine/Team.php";
require_once "Doctrine/Player.php";
require_once "boostrap.php";
$id=1;
//Search the player whose id is 1
$player=$entityManager->find("Player",$id);
if(!$player){
echo "Player not found";
}
else{
echo "Player's name: ".$player->getName()."<br>";
$team=$player->getTeam();
echo "Team's name: ".$team->getName()."<br>";
}
?>
Is it a Library problem? How can I solve it? Thank you in advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
