-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
Doctrine.Tests.ORM.Mapping.User.dcm.yml
82 lines (82 loc) · 1.71 KB
/
Doctrine.Tests.ORM.Mapping.User.dcm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Doctrine\Tests\ORM\Mapping\User:
type: entity
table: cms_users
options:
foo: bar
baz:
key: val
namedQueries:
all: SELECT u FROM __CLASS__ u
id:
id:
type: integer
generator:
strategy: AUTO
sequenceGenerator:
sequenceName: tablename_seq
allocationSize: 100
initialValue: 1
fields:
name:
type: string
length: 50
nullable: true
unique: true
options:
foo: bar
baz:
key: val
email:
type: string
column: user_email
columnDefinition: CHAR(32) NOT NULL
version:
type: integer
version: true
embedded:
parents:
class: Parents
oneToOne:
address:
targetEntity: Address
inversedBy: user
joinColumn:
name: address_id
referencedColumnName: id
onDelete: CASCADE
cascade: [ remove ]
oneToMany:
phonenumbers:
targetEntity: Phonenumber
orphanRemoval: true
mappedBy: user
orderBy:
number: ASC
cascade: [ persist ]
manyToMany:
groups:
targetEntity: Group
joinTable:
name: cms_users_groups
joinColumns:
user_id:
referencedColumnName: id
nullable: false
unique: false
inverseJoinColumns:
group_id:
referencedColumnName: id
columnDefinition: INT NULL
cascade:
- all
lifecycleCallbacks:
prePersist: [ doStuffOnPrePersist, doOtherStuffOnPrePersistToo ]
postPersist: [ doStuffOnPostPersist ]
uniqueConstraints:
search_idx:
columns: name,user_email
indexes:
name_idx:
columns: name
0:
columns: user_email