Commit fc4b3bf5 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

N'utilise pas le cache pour les objets sans @id.

parent 365d7fa6
......@@ -40,6 +40,7 @@ use Irstea\NgModelGeneratorBundle\Models\Types\Operations\Path;
use Irstea\NgModelGeneratorBundle\Models\Types\Placeholder;
use Irstea\NgModelGeneratorBundle\Models\Types\Reference;
use Irstea\NgModelGeneratorBundle\Models\Types\Resources\Collection;
use Irstea\NgModelGeneratorBundle\Models\Types\Resources\Representation;
use Irstea\NgModelGeneratorBundle\Models\Types\Type;
use Irstea\NgModelGeneratorBundle\Models\Types\Union;
......@@ -184,6 +185,12 @@ final class OperationMapper
implode(', ', $callParameters)
);
/** @var Representation|null $repr */
$repr = $returnType->findType(Representation::class);
if ($repr === null || !$repr->hasProperty('@id')) {
return $clientCall;
}
$opDef = $this->operation->getOpDef();
if ($opDef->isGetCollection()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment