Multiple belongsTo
associations in same model to same target not working with inverse
#15625
Closed
3 of 6 tasks
Labels
Issue Creation Checklist
Bug Description
When using multiple
belongsTo
associations in same model to same target with inverse, it complains that associations are not compatible.Associations are defined from side where FK is located, with
inverse
property specified.First associations is normally defined. But second is causing problem. Second associations works if
inverse
is removed.I think that the problem is when defining second relation with
inverse
, it is not creating inverse relation properly, since it's comparing it with already existing 1st relationReproducible Example
Here is the link to the SSCCE for this issue: link
PR: link
What do you expect to happen?
To define 2 associations with inverse associations.
What is actually happening?
It throws an error saying that they are
incompatible because their options are not reconcilable
.Error:
Environment
Would you be willing to resolve this issue by submitting a Pull Request?
Open to take a look, but I think this is too deep in the library.
Indicate your interest in the resolution of this issue by adding the 👍 reaction. Comments such as "+1" will be removed.
The text was updated successfully, but these errors were encountered: