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
First off, THANK YOU for the time you have put into this plugin. This is functionality badly needed in core.
I'm having trouble getting it to work. Not sure if what i'm seeing is version specific, but it is ugly.
Installing the plugin breaks existing has_many :through and has_one :through associations.
The SQL generated for has_many :through is using the wrong value for the join ID (appears to be using the local id, rather than the id of the intermediary model?). I monkey-patched this by changing line 20 lib/nested_has_many_through.rb to:
However, this "fix" breaks has_one :through associations, trying to put the wrong id (the :remote_key, it seems?) on @owner model.
As noted in Issue #1, has_one :through has it's own problems anyway.
I forked, I combed through the code, I did some debug outs, traced what was happening, but could not identify the cause of these issues. Perhaps it is something with the way it is interacting with Rails? Especially Rails 2.3?
There are no references to "has_one" in the plugin, so maybe that just isn't handled at all? Any insights you have would be appreciated.
Again, thank you for taking on the burden of maintaining this essential tool.
The text was updated successfully, but these errors were encountered:
First off, THANK YOU for the time you have put into this plugin. This is functionality badly needed in core.
I'm having trouble getting it to work. Not sure if what i'm seeing is version specific, but it is ugly.
Installing the plugin breaks existing has_many :through and has_one :through associations.
The SQL generated for has_many :through is using the wrong value for the join ID (appears to be using the local id, rather than the id of the intermediary model?). I monkey-patched this by changing line 20 lib/nested_has_many_through.rb to:
However, this "fix" breaks has_one :through associations, trying to put the wrong id (the :remote_key, it seems?) on @owner model.
As noted in Issue #1, has_one :through has it's own problems anyway.
I forked, I combed through the code, I did some debug outs, traced what was happening, but could not identify the cause of these issues. Perhaps it is something with the way it is interacting with Rails? Especially Rails 2.3?
There are no references to "has_one" in the plugin, so maybe that just isn't handled at all? Any insights you have would be appreciated.
Again, thank you for taking on the burden of maintaining this essential tool.
The text was updated successfully, but these errors were encountered: