Doctrine Website
  1. Doctrine Website
  2. DWEB-99

5.14. Many-To-Many, Bidirectional Missing target-entity

    Details

    • Type: Documentation Documentation
    • Status: Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Component/s: Documentation
    • Labels:
      None
    • Environment:
      Documentation missing a tag to work

      Description

      <doctrine-mapping>
      <entity name="User">
      <many-to-many field="groups" inversed-by="users">
      <join-table name="users_groups">
      <join-columns>
      <join-column="user_id" referenced-column-name="id" />
      </join-columns>
      <inverse-join-columns>
      <join-column="group_id" referenced-column-name="id" />
      </inverse-join-columns>
      </join-table>
      </many-to-many>
      </entity>

      <entity name="Group">
      <many-to-many field="users" mapped-by="groups" />
      </entity>
      </doctrine-mapping>

      should be this to work:

      <doctrine-mapping>
      <entity name="User">
      <many-to-many field="groups" inversed-by="users" target-entiy="Group">
      <join-table name="users_groups">
      <join-columns>
      <join-column="user_id" referenced-column-name="id" />
      </join-columns>
      <inverse-join-columns>
      <join-column="group_id" referenced-column-name="id" />
      </inverse-join-columns>
      </join-table>
      </many-to-many>
      </entity>

      <entity name="Group">
      <many-to-many field="users" mapped-by="groups" target-enty="User" />
      </entity>
      </doctrine-mapping>

        Activity

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Dennis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: