ramsey / uuid-doctrine

:snowflake::file_cabinet: Allow the use of a ramsey/uuid UUID as Doctrine field type.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't instantiate custom generator : Ramsey\Uuid\Doctrine\UuidGenerator

abelardolg opened this issue · comments

<entity name="App\Core\Domain\Model\Dashboard\DashboardLoginModel" table="dashboard_login">
        <id name="id" column="id" type="uuid">
            <generator strategy="CUSTOM"/>
            <custom-id-generator class="Ramsey\Uuid\Doctrine\UuidGenerator"/>
        </id>>
        <embedded name="identifier" class="App\Core\Domain\Model\ValueObject\Identifier"/>
        <field name="password" type="string"/>
        <field name="loggedin_at" type="datetime"/>
    </entity>

$this->id = Uuid::uuid4()->toString();

Why does Doctrine/Symfony show me this message (see ttitle)?

What's wrong?