You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
The automatic detection of inverse relationships seems a little error-prone to me. It heavily depends upon the usage of symbols in :child_key Options. Example:
class A
belongs_to :b
end
class B
has n, :as, :child_key => 'b_id'
end
In this case the inverse would be generated (ignoring the existing one) because of :child_key being a String.
This problem prevents the specification of DB constraints other then :protect (the default for automatically generated inverse relationships) when using Strings instead of Symbols in :child_key options.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The automatic detection of inverse relationships seems a little error-prone to me. It heavily depends upon the usage of symbols in
:child_key
Options. Example:In this case the inverse would be generated (ignoring the existing one) because of
:child_key
being a String.The Bug is located here:
dm-core/lib/dm-core/associations/relationship.rb
Line 642 in c8f87d9
This problem prevents the specification of DB constraints other then
:protect
(the default for automatically generated inverse relationships) when using Strings instead of Symbols in:child_key
options.The text was updated successfully, but these errors were encountered: