Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update README

  • Loading branch information...
commit 0b3284e3659dac8565bf80c57ed7d22c9830ccdf 1 parent 1af96c2
@flyerhzm authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 README.md
View
8 README.md
@@ -16,9 +16,11 @@ define it in your Gemfile
include the module after Mongoid::Document
- class User
+ class Post
include Mongoid::Document
include Mongoid::EagerLoading
+
+ referenced_in :user
end
then you can use the eager loading like
@@ -26,10 +28,12 @@ then you can use the eager loading like
Post.includes(:user)
Post.includes(:user, :comment)
+eager loading can be only used on referenced_in, references_one and references_many associations.
+
Benchmark
---------
-I also ruun a [benchmark][1] on my local computer, the result is as follows
+I also run a [benchmark][1] on my local computer, the result is as follows
Starting benchmark...
user system total real
Please sign in to comment.
Something went wrong with that request. Please try again.