We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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:
YAML relationship configs will looks like this:
authors: relationships: has_many: - posts counter_cache: - posts posts: relationships: belongs_to: authors
Sorry, something went wrong.
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"
No branches or pull requests
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: