This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HasManyThrough with unlimited intermediate models. #259
Comments
Transferring this to the orm repo |
@meideros how do you expect something like this to look? This would require a huge and confusing chain of primary keys and models. If these relationships are too distant it might make more sense from a database perspective to denormalize a bit |
It would have to work like this |
This is actually a good feature to add sometimes I have this kind of scenario in my app. |
Exactly it will look like this |
Guys I think this is the right place to share another very good breakdown of this requirement. I constantly refer back to this article in my Laravel development. Hope it helps. |
If I have some extra time on my hands I can work on this but it's not something I can get to soon. I am willing to test and review any pull requests that attempt to solve this |
I'm just not that good in Python to be of much help, but I think that the "trick" in the above example is passing a reference (pointer) back from the lambda (?) function which helps to avoid a great deal of effort otherwise. hope I'm using the correct python terms |
@projectmentor yeah that might actually work. Thats a nice little workout. I'd have to try it to see if it works here |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I realize that orator orm does not allow us to apply hasmanythrough between more than three models, and since masonite orm is a package that aims to replace orator orm, I suggest that this be possible with masinite orm.
The text was updated successfully, but these errors were encountered: