-
Notifications
You must be signed in to change notification settings - Fork 21
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
Rails 6.0 breaks relations in historical models #181
Comments
tagliala
added a commit
that referenced
this issue
Oct 14, 2022
tagliala
added a commit
that referenced
this issue
Oct 14, 2022
Starting from Rails 6.0, read_attribute will use the memoized `primary_key` if it detects that the attribute name is `id`. Since the `primary key` may have been changed to `hid` in this case because of `find` overload, the new behavior may break relations where `id` is still the correct attribute to read for foreign key Fix: #181
tagliala
added a commit
that referenced
this issue
Oct 14, 2022
tagliala
added a commit
that referenced
this issue
Oct 14, 2022
Starting from Rails 6.0, read_attribute will use the memoized `primary_key` if it detects that the attribute name is `id`. Since the `primary key` may have been changed to `hid` in this case because of `find` overload, the new behavior may break relations where `id` is still the correct attribute to read for foreign key Fix: #181
tagliala
added a commit
that referenced
this issue
Nov 27, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After Rails 6.0, chronomodel uses
hid
to search into relations when the historical object is associated without passing from the object itselfExpected output
true
Actual output
false
The text was updated successfully, but these errors were encountered: