I'm trying to add a circular (relationship with itself) M:M relationship to the Product Templates module. I was to create it and the subsequent linking table and add the subpanels for both the left and right side of the relationship.
However, when I try to add/link/unlink records to any of the two subpanels, it is duplicated to the other. I checked the linking table, and 2 rows were added.
This is the vardefs for the relationship:
This is the metadata for the relationship:
How can I make it so that, there should be no duplicates when I add/link a record to any of the subpanels?
EDIT:
After some digging in the Sugar Core files, I found out that when the you have a self referencing relationship (when LHS module = RHS module), it will do another addRow to the table. (M2MRelationship.php, line 142). This must be the one that's causing the additional row, but since this is a parent-child relationship, I would not need this.
Any help is appreciated. Thanks!