We don't officially support embeddables as identifiers at the moment. They
may work, but I'd try the annotation or XML drivers first, and write tests
for that (if it works). No guarantees/batteries included, sorry!

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

On 27 January 2016 at 18:18, Bartosz Bartniczak <[email protected]
> wrote:

> Is there any way to set Embeddable as Entity ID?
>
> The code below works almost fine, but id column does not have
> AUTO_INCREMENT property set.
>
> AppBundle\Entity\User\User:
>   type: entity
>   table: users
>   embedded:
>     id:
>       class: AppBundle\Entity\User\UserId
>       columnPrefix: false
>   fields:
>     firstName:
>       type: string
>       length: 100
>     lastName:
>       type: string
>       length: 100
>
>
> AppBundle\Entity\User\UserId:
>   type: embeddable
>   id:
>     value:
>       column: id
>       type: integer
>       generator:
>         strategy: IDENTITY
>
>
> I use Postgres database, and Doctrine-ORM 2.5
> Is there any solution for this problem?
>
> --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to