Skip to content
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

HasOneOrMany wrongly uses TRelatedModel as the type for the declaring model of the relation #1284

Open
nagmat84 opened this issue Jun 19, 2022 · 0 comments

Comments

@nagmat84
Copy link

HasOneOrMany has only a single template parameter TRelatedModel which is bound to the model class which the relation points to. However, HasOneOrMany also uses TRelatedModel as the type for the model class which declares the relation.

https://github.com/nunomaduro/larastan/blob/ccdd599c464f9de6983a8d5e0f36daaf324b646f/stubs/HasOneOrMany.stub#L11-L20

The declaring model model (or parent or owning model) is not the same as the related model.

Originally posted by @nagmat84 in #1275 (comment)

@nagmat84 nagmat84 mentioned this issue Jun 19, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant