I have bundle Api platform with Symfony 4.2 but when post data with Model Group.php, appear this error:
"hydra:description": "Unable to generate an IRI for the item of type "App\Entity\Group"",
I don't understand this.
My Model Group:
<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
/**
* @ApiResource(iri="http://schema.org/Group")
*
* @ORM\Table(name="group")
*/
class Group
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
}
I need your help :)
Thx guys.
php bin/console c:c2. copy the full stack trace Thanks - Kévin Dunglas