-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Investigate issues with includes
#16
Comments
@glacials: I can take a look at this 👍 Regarding the above, is your setup something like the following? class Race
has_many :entries
end
class Entry
belongs_to :race
belongs_to :runner
end
class Runner
has_many :entries
end
race = Race.create
runner = Runner.create
entry = Entry.create(race: race, runner: runner) |
Yep, exactly! Thanks for volunteering to take a look at this. |
Sure thing! I should have included this above, but all three models mixing in FriendlyUUID? I.e., class Race
include FriendlyUUID
has_many :entries
end
class Entry
include FriendlyUUID
belongs_to :race
belongs_to :runner
end
etc |
Re-ping for @glacials in case you missed the above 🙇 |
Sorry for awol, have not had much free time. In my example actually only Race uses FriendlyUUID, the others use standard auto-incrementing integer IDs with no gems involved. The link I provided above is the actual code base I encountered this in, if you're still having trouble with the test and interested enough to try to repro there. Thanks for all the effort, I really appreciate it! |
It seems this code is returning no record:
whereas this code is correctly returning a record:
Discovered while going through
strict_loading
audits in Rails 6.1.The text was updated successfully, but these errors were encountered: