File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,32 @@ Acme\UserBundle\Entity\User:
236236 group_id :
237237 referencedColumnName : id
238238` ` `
239-
239+ ` ` ` xml
240+ <?xml version="1.0" encoding="UTF-8"?>
241+ <doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
242+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
243+ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
244+ http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
245+ <entity name="Application\Sonata\UserBundle\Entity\User" table="fos_user_user">
246+ <id name="id" column="id" type="integer">
247+ <generator strategy="AUTO" />
248+ </id>
249+ <many-to-many field="groups" target-entity="Group">
250+ <cascade>
251+ <cascade-all/>
252+ </cascade>
253+ <join-table name="fos_user_group">
254+ <join-columns>
255+ <join-column name="user_id" referenced-column-name="id"/>
256+ </join-columns>
257+ <inverse-join-columns>
258+ <join-column name="group_id" referenced-column-name="id" />
259+ </inverse-join-columns>
260+ </join-table>
261+ </many-to-many>
262+ </entity>
263+ </doctrine-mapping>
264+ ```
240265#### b) MongoDB User-Group mapping
241266
242267``` php
You can’t perform that action at this time.
0 commit comments