From 5e41bea598ff38b3c520b69fd92ee3412e716df2 Mon Sep 17 00:00:00 2001 From: polo Date: Tue, 9 Sep 2025 15:37:50 +0200 Subject: =?UTF-8?q?fin=20de=20l'utilisation=20du=20champ=20article=5Ftimes?= =?UTF-8?q?tamp=20de=20la=20table=20node,=20r=C3=A9solue=20erreur=20lorsqu?= =?UTF-8?q?e=20deux=20news=20sont=20cr=C3=A9=C3=A9es=20dans=20la=20m=C3=AA?= =?UTF-8?q?me=20minute=20(pas=20dans=20la=20m=C3=AAme=20seconde=20par=20co?= =?UTF-8?q?ntre)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/entities/Node.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/model') diff --git a/src/model/entities/Node.php b/src/model/entities/Node.php index 7cf395c..eb73116 100644 --- a/src/model/entities/Node.php +++ b/src/model/entities/Node.php @@ -17,7 +17,7 @@ class Node #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: "integer")] - private int $id_node; + private ?int $id_node = null; #[ORM\Column(type: "string", length: 255)] private string $name_node; @@ -52,16 +52,14 @@ class Node private ?NodeData $node_data = null; - // -- fin des attributs destinés à doctrine, début du code utilisateur -- - + // attributs non destinés à doctrine private array $children = []; // tableau de Node private ?self $adopted = null; // = "new" est un enfant de "main" lorsque la page est "article" static private array $default_attributes = ['css_array' => ['body', 'head', 'nav', 'foot'],'js_array' => ['main']]; - public function __construct(string $name = '', ?string $article_timestamp = null, array $attributes = [], int $position = 0, ?self $parent = null, ?Page $page = null, ?Article $article = null) + public function __construct(string $name = '', array $attributes = [], int $position = 0, ?self $parent = null, ?Page $page = null, ?Article $article = null) { $this->name_node = $name; - $this->article_timestamp = $article_timestamp; $this->attributes = $attributes; $this->position = $position; $this->parent = $parent; @@ -70,7 +68,7 @@ class Node } // pfff... - public function getId(): int + public function getId(): ?int { return $this->id_node; } -- cgit v1.2.3