Last active
December 30, 2015 11:39
-
-
Save gwright/7824064 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3.2.12 - 3.2.16 | |
Scopes that are | |
-- combined via #merge AND | |
-- are simple column/value equality tests | |
will be MERGED, last equality test wins. | |
Chained scopes don't always use merge: | |
-- explicit where clauses don't use merge (=> AND) | |
-- class methods (vs scopes) don't use merge ( => AND) | |
Chained scopes sometimes use merge: | |
-- scope references (vs class methods) use MERGE logic | |
-- an explicit merge, uses MERGE logic | |
An explicit merge will cause ALL chained relations to be merged (class, explicit, scope) | |
Model.a.merge(Model.c.d) # a.merge(c).merge(d) | |
4.0.0 and beyond | |
equality scopes are ONLY merged via an explicit use of merge | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment