Answer the question
In order to leave comments, you need to log in
Bug in Many-To-Many, Bidirectional?
<many-to-many target-entity="App\Domain\AccessControlListPack\Role\Entity\Role"
field="roles"
inversed-by="features"
index-by="uuid"
>
<cascade>
<cascade-persist/>
</cascade>
<join-table name="roles_features">
<join-columns>
<join-column name="feature_uuid" referenced-column-name="uuid" nullable="false" unique="false"/>
</join-columns>
<inverse-join-columns>
<join-column name="role_uuid" referenced-column-name="uuid" nullable="false"/>
</inverse-join-columns>
</join-table>
</many-to-many>
<many-to-many target-entity="App\Domain\AccessControlListPack\FeatureTag\Entity\RoleFeatureTag"
field="features"
inversed-by="roles"
index-by="uuid"
>
<cascade>
<cascade-persist/>
</cascade>
<join-table name="roles_features">
<join-columns>
<join-column name="role_uuid" referenced-column-name="uuid" nullable="false"/>
</join-columns>
<inverse-join-columns>
<join-column name="feature_uuid" referenced-column-name="uuid" nullable="false"/>
</inverse-join-columns>
</join-table>
</many-to-many>
In SchemaException.php line 112:
The table with name 'postgres.roles_features' already exists.
In MappingException.php line 165:
No mapping found for field 'id' on class 'App\Domain\AccessControlListPack\FeatureTag\Entity\RoleFeatureTag'.
Answer the question
In order to leave comments, you need to log in
https://www.doctrine-project.org/projects/doctrine...
You have it everywhere inversed-by
, although on the second side it should be mapped-by
without join-table
The part about id is not clear. What is the problem with changing the value of referenced-column-name="id", where will the side effects come from?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question