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

Method to check if relationship was loaded for 4.0.x #13616

Merged
merged 1 commit into from
Nov 24, 2018

Conversation

CameronHall
Copy link
Contributor

Hello!

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the Contributing Guidelines?
  • I have checked that another pull request for this purpose does not exist.
  • I wrote some tests for this PR.

Small description of change: This pull request adds a method to check if a relationship is loaded. It also changes the way we cache relationships. For some reason we only stored hasOne and belongsTo relationships (those that return a model). Now we store resultset as well, which enables caching for hasMany, hasManyToMany etc.

Co-authored-by: Erik Wiesenthal [email protected]

Thanks

Co-authored-by: Erik Wiesenthal <[email protected]>

This commit also changes the way we cache relationships. For _some_ reason we only stored `hasOne` and `belongsTo` relationships (those that return a model. Now we store resultset as well, which  enables caching for `hasMany`, `hasManyToMany` etc.
Copy link
Contributor

@sergeyklay sergeyklay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sergeyklay sergeyklay added this to the 4.0.0 milestone Nov 24, 2018
@niden niden merged commit 2761e0e into phalcon:4.0.x Nov 24, 2018
@niden
Copy link
Member

niden commented Nov 24, 2018

Thank you !!

@niden niden added the documentation Documentation required label Apr 9, 2019
@niden niden added the enhancement Enhancement to the framework label May 11, 2019
@CameronHall CameronHall deleted the feature/is-relationship-loaded-4.x branch October 24, 2019 11:38
@niden niden added 4.0 and removed documentation Documentation required labels Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to the framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants