parental
parental copied to clipboard
Allow a model to be both a parent and child
The only reason this didn't work previously was due to duplicate method names in HasParent and HasChildren traits.
We have a use case where we have several layers of abstraction:
A extends B B extends C
With this change we can now:
A HasParent B HasParent, Has Children C Has Children
and by C::find('1234') will return the class instance of A correctly.
@driftingly Is there something to be done before this can be merged? I'd be interested in this functionality, so I'd be glad to help.
@tobias-grasse If you're able to, tests would be helpful.
I ran this update through the test suite of a larger project and didn't run into any issues.