Doctrine ORM value object for mutiple database fields

199 views Asked by At

I have the following ORM:

AppBundle\Domain\ValueObject\Date\Birthday:
type: embeddable
fields:
  birthday:
    column: fecha_nacimiento
    type: datetime

And I want to use this value object in two tables, the first is "User" table:

AppBundle\Domain\Entity\User\User:
type: entity
table: usuarios_web
repositoryClass:     AppBundle\Infrastructure\Persistence\Doctrine\Repository\User\UserDoctrineRepository
embedded:
  birthday:
    class: AppBundle\Domain\ValueObject\Date\Birthday
    columnPrefix: false

But then I want to use the same birthday on another table who's birthday field is not "fecha_nacimiento", is different.

It's possible to map the DB field in the emmbedded instead of the embeddable?

0

There are 0 answers