Skip to content

Implement 'belongs to' relations in models #93

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

Merged
merged 14 commits into from
Mar 12, 2025

Conversation

SOHELAHMED7
Copy link
Member

Fixes #90

@SOHELAHMED7 SOHELAHMED7 requested a review from cebe March 3, 2025 12:45
@SOHELAHMED7 SOHELAHMED7 self-assigned this Mar 3, 2025
@SOHELAHMED7 SOHELAHMED7 linked an issue Mar 3, 2025 that may be closed by this pull request
…ant-inverse-relations' of github.com:php-openapi/yii2-openapi into 90-implement-belongs-to-relations-in-models
@SOHELAHMED7 SOHELAHMED7 marked this pull request as ready for review March 4, 2025 10:35
@cebe
Copy link
Member

cebe commented Mar 12, 2025

Why did you remove the inverseOf() relations?

@SOHELAHMED7
Copy link
Member Author

I haven't removed inverseOf() relations for one to many (hasMany()) relations because while going through Yii docs I thought inverseOf() will only make more sense for one to many relation.

I have removed inverseOf() for one to one relations and used belongs to (same as hasOne()) instead and I think inverseOf() will not be much useful here.

@cebe cebe merged commit 4d32a93 into master Mar 12, 2025
5 checks passed
@cebe cebe deleted the 90-implement-belongs-to-relations-in-models branch March 12, 2025 14:49
@cebe cebe added this to the 2.0.0 milestone Mar 12, 2025
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 this pull request may close these issues.

Implement 'belongs to' relations in models
2 participants