This feature is available in newest version 126.96.36.1993 Here is info how this feature works.
We decided to implement two ways how to set custom attributes to ManyToMany element.
Based on a destination entity
The first method offers you to set custom values based on a destination entity. This means you will be able to edit these values when you select association leading from MN entity to Destination Entity.
If you want to configure orm properties in such way, simply add following XML snippet to your Doctrine2 configuration file
<attribute name="custom-first" type="string"/>
<attribute name="custom-second" type="string"/>
Based on an Owner/Inverse side
The second method how you can configure ManyToMany custom attributes is by Owning/Inverse notation. To do that, choose MN object inside the Entity, choose required side and edit the property .
Here is an example of XML configuration to configure such behavior:
<attribute name="custom-owning" type="string"/>
<attribute name="custom-inverse" type="string"/>
Comparison of both methods
Each of this solution has some advantages/disadvantages:
- it's easier to use than the second way
- property types are the same for both sides
- need to understand Inverse/Owner side of MN association
- ability to set different property types for each side
It's up to each user which solution is the best for him and what he choose. It's not a problem to combine both solutions in the same time.
One more improvement
The last improvement in ManyToMany export script is the ability to define custom attributes also for join-table element. To do this, insert following setting to your configuration:
<attribute name="custom-root" type="string"/>
Support for this attribute is fully available for XML, YML and PHP annotations export. In case you will update ORM Designer configuration in the way described above, export files will contain following data:
<many-to-many custom-second="custom-second" custom-owning="custom-owning" ...>
<join-table name="Table1ToTable2" custom-root="custom-root">
<many-to-many custom-first="custom-first" custom-inverse="custom-inverse"/>