Skip to content

Commit 49ae19c

Browse files
committed
Doctrine Example: fixed id property to be string on 8.1
1 parent 4770d30 commit 49ae19c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/doctrine/src/UserEntity.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
class UserEntity
1212
{
1313
/**
14-
* @ORM\Column(name="rowid", type="string", nullable=false, options={"unsigned"=true})
14+
* @ORM\Column(name="rowid", type="string", nullable=false)
1515
* @ORM\Id
16-
* @ORM\GeneratedValue(strategy="IDENTITY")
16+
* @ORM\GeneratedValue(strategy="AUTO")
1717
* @var null|string
1818
*/
1919
private $id = null;
@@ -38,7 +38,7 @@ public function __construct(string $name)
3838

3939
public function getId(): string
4040
{
41-
return $this->id;
41+
return $this->id === null ? null : (string)$this->id;
4242
}
4343

4444
public function getName(): string

0 commit comments

Comments
 (0)