parental icon indicating copy to clipboard operation
parental copied to clipboard

Allow a model to be both a parent and child

Open chadhutchins opened this issue 2 years ago • 3 comments

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.

chadhutchins avatar Oct 11 '22 17:10 chadhutchins

@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 avatar May 12 '23 10:05 tobias-grasse

@tobias-grasse If you're able to, tests would be helpful.

driftingly avatar May 18 '23 22:05 driftingly

I ran this update through the test suite of a larger project and didn't run into any issues.

driftingly avatar May 18 '23 22:05 driftingly