-
Notifications
You must be signed in to change notification settings - Fork 174
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
Fix fetch has_many embedded association after adding to it #449
Changes from all commits
aca0185
803d05e
514b650
21634dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: identity-cache | |
up: | ||
- homebrew: | ||
- postgresql | ||
- ruby: 2.4.1 | ||
- ruby: 2.4.10 | ||
- railgun | ||
- bundler | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,7 +134,7 @@ def test_prefetch_associations_on_association | |
|
||
setup_has_many_children_and_grandchildren(@bob) | ||
|
||
associated_records = @bob.associated_records | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test was failing because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opened #453 to keep track of this issue. |
||
associated_records = Item.find(@bob.id).associated_records | ||
|
||
assert_queries(1) do | ||
assert_memcache_operations(1) do | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test seems to fail for
Item.cache_has_many(:associated_records, embed: true)
, is that expected?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
I was thinking it was only an issue with id embedding, but I think that is just because the symptoms of the problem were different for id embedding.
I've pushed a commit fixing this for
cache_has_many
embed: true