Skip to content

Instantly share code, notes, and snippets.

@nexik
Created December 20, 2014 22:16
Show Gist options
  • Save nexik/6f686d218028103fa453 to your computer and use it in GitHub Desktop.
Save nexik/6f686d218028103fa453 to your computer and use it in GitHub Desktop.
User EmailAddress Value Object Mappings Doctrine2
AppBundle\Entity\User\EmailAddress:
type: embeddable
fields:
address:
column: email
type: string
length: '250'
AppBundle\Entity\User:
type: entity
table: users
repositoryClass: AppBundle\Repository\UserRepository
id:
id:
type: integer
id: true
generator:
strategy: AUTO
embedded:
email:
class: AppBundle\Entity\User\EmailAddress
columnPrefix: false
fields:
password:
type: string
length: '60'
lifecycleCallbacks: { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment