Skip to content

Commit

Permalink
Merge pull request #847 from cachethq/eager-load-metric-points
Browse files Browse the repository at this point in the history
Eager load the metric points.
  • Loading branch information
GrahamCampbell committed Aug 1, 2015
2 parents 573a301 + 971a422 commit c46c255
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/Models/Metric.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ class Metric extends Model implements HasPresenter
*/
protected $fillable = ['name', 'suffix', 'description', 'display_chart', 'default_value', 'calc_type'];

/**
* The relations to eager load on every query.
*
* @var string[]
*/
protected $with = ['points'];

/**
* Metrics contain many metric points.
*
Expand Down

0 comments on commit c46c255

Please sign in to comment.