Closed xtagon closed 8 years ago
Hey Justin,
Thanks for the report, I'll take a look at it ASAP. Could you please provide me with your Rails version before I'll dig into it?
Rails 4.2.3, activerecord-hierarchical_query 0.0.7 On Aug 22, 2015 3:26 AM, "Alexey Mihaylov" notifications@github.com wrote:
Hey Justin,
Thanks for the report, I'll take a look at it ASAP. Could you please provide me with your Rails version before I'll dig into it?
— Reply to this email directly or view it on GitHub https://github.com/take-five/activerecord-hierarchical_query/issues/3#issuecomment-133676044 .
A similar error occurs if I add where()
or exists?(conditions)
clause to a relation that has join_recursive
called on it. I may be misunderstanding the usage of your library though, am I supposed to do the where
or exists?
check within the join block?
No, it's definitely a bug. Sorry, I don't have time to dig into it, right now. I will try to investigate it next week.
Took almost a year to, but problem is finally solved :) Fix is released in version 0.1.2
Thank you so much! :smile:
I hope you're still on rails 4.2, because 5.0 isn't supported yet :)
I am for now, but that's good to know. I'll keep an eye on #13
Hi,
Thanks for writing this gem, it is very helpful and has saved me some headaches. Great work!
There was an issue in one of my apps today where I got a
PG::ProtocolViolation
when trying to nest a recursive query in thewhere
clause of another query. There is a workaround, but here is a description of the problem:This fails because the last
where
clause has a$1
in the prepared statement, but the nestedselect
from the recursive join also has a$1
. Full example:Notice that
$1
appears twice. The solution was to do a separate query for the list of IDs like so:Do you know of a way this can be fixed?
Thanks, Justin