I got what I wanted by using the middletable.getName...
eg.
public String foreignKeyToManyToManyName(ForeignKey fromKey, TableIdentifier middleTable, ForeignKey toKey, boolean uniqueReference) {
return super.foreignKeyToManyToManyName(fromKey,middleTable,toKey, true)+"For"+middleTable.getName();
}
I tried to force uniqueReference=false but that did not include the middletable when foreignKeyToManyToManyName was called. My problem is that table A and b has same primary keys in the middletabel 1, 2 and 3...
Table a -> Table_1_a_And_b <- Table B
Table a -> Table_2_a_And_b <- Table B
Table a -> Table_3_a_And_b <- Table B
...and that caused the setter method to be same name no mather wath value I set the uniqueReference to. I need the middletable name to get it unique.
|