Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
The schema tool now doesn't add a foreign constraint when subclassess of... #440
... a STI use the same field to map relations with entities of different classes
It seems that there are no particular side-effects in mapping different relationship using the same table column name in different subclasses of a STI hierarchy.
I wasn't sure about this so I tested to see if there were errors. And I was surprised that everything runs without any particular problem.
This PR ensures that the foreign key is not added if there are at least two different classes mapped on the same field of a db table.