-
Notifications
You must be signed in to change notification settings - Fork 84
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
Feature: Counter cache #88
Labels
Comments
YAML relationship configs will looks like this: authors:
relationships:
has_many:
- posts
counter_cache:
- posts
posts:
relationships:
belongs_to: authors |
As we're discussing on #130, the counter cache feature may be defined like this: authors:
has_many:
- posts:
counter_cache: true # creates a field with name "books_count" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Allow belongs_to relationships to cache the number of related rows.
Like Rails: http://apidock.com/rails/ActiveRecord/Associations/ClassMethods/belongs_to
The text was updated successfully, but these errors were encountered: