@@ -50,12 +50,21 @@ The following configuration code shows how you can configure two entity managers
5050 default :
5151 connection : default
5252 mappings :
53- AppBundle : ~
54- AcmeStoreBundle : ~
53+ Main :
54+ is_bundle : false
55+ type : annotation
56+ dir : ' %kernel.project_dir%/src/Entity/Main'
57+ prefix : ' App\Entity\Main'
58+ alias : Main
5559 customer :
5660 connection : customer
5761 mappings :
58- AcmeCustomerBundle : ~
62+ Customer :
63+ is_bundle : false
64+ type : annotation
65+ dir : ' %kernel.project_dir%/src/Entity/Customer'
66+ prefix : ' App\Entity\Customer'
67+ alias : Customer
5968
6069 .. code-block :: xml
6170
@@ -94,12 +103,25 @@ The following configuration code shows how you can configure two entity managers
94103
95104 <doctrine : orm default-entity-manager =" default" >
96105 <doctrine : entity-manager name =" default" connection =" default" >
97- <doctrine : mapping name =" AppBundle" />
98- <doctrine : mapping name =" AcmeStoreBundle" />
106+ <doctrine : mapping
107+ name =" Main"
108+ is_bundle =" false"
109+ type =" annotation"
110+ dir =" %kernel.project_dir%/src/Entity/Main"
111+ prefix =" App\Entity\Main"
112+ alias =" Main"
113+ />
99114 </doctrine : entity-manager >
100115
101116 <doctrine : entity-manager name =" customer" connection =" customer" >
102- <doctrine : mapping name =" AcmeCustomerBundle" />
117+ <doctrine : mapping
118+ name =" Customer"
119+ is_bundle =" false"
120+ type =" annotation"
121+ dir =" %kernel.project_dir%/src/Entity/Customer"
122+ prefix =" App\Entity\Customer"
123+ alias =" Customer"
124+ />
103125 </doctrine : entity-manager >
104126 </doctrine : orm >
105127 </doctrine : config >
@@ -139,14 +161,25 @@ The following configuration code shows how you can configure two entity managers
139161 'default' => array(
140162 'connection' => 'default',
141163 'mappings' => array(
142- 'AppBundle' => null,
143- 'AcmeStoreBundle' => null,
164+ 'Main' => array(
165+ is_bundle => false,
166+ type => 'annotation',
167+ dir => '%kernel.project_dir%/src/Entity/Main',
168+ prefix => 'App\Entity\Main',
169+ alias => 'Main',
170+ )
144171 ),
145172 ),
146173 'customer' => array(
147174 'connection' => 'customer',
148175 'mappings' => array(
149- 'AcmeCustomerBundle' => null,
176+ 'Customer' => array(
177+ is_bundle => false,
178+ type => 'annotation',
179+ dir => '%kernel.project_dir%/src/Entity/Customer',
180+ prefix => 'App\Entity\Customer',
181+ alias => 'Customer',
182+ )
150183 ),
151184 ),
152185 ),
@@ -155,8 +188,8 @@ The following configuration code shows how you can configure two entity managers
155188
156189 In this case, you've defined two entity managers and called them ``default ``
157190and ``customer ``. The ``default `` entity manager manages entities in the
158- AppBundle and AcmeStoreBundle , while the ``customer `` entity manager manages
159- entities in the AcmeCustomerBundle . You've also defined two connections, one
191+ `` src/Entity/Main `` directory , while the ``customer `` entity manager manages
192+ entities in `` src/Entity/Customer `` . You've also defined two connections, one
160193for each entity manager.
161194
162195.. note ::
0 commit comments