On Aug 24, 7:49 pm, Jeremy Evans <[email protected]> wrote: > On Aug 24, 10:01 am, Mike Luu <[email protected]> wrote: > > > On Aug 24, 2010, at 9:26 AM, Jeremy Evans wrote: > > > > Is there a reason you are using both an implicit table alias and an > > > explicit table alias? I'm just curious. > > > eager graphing/loading a many_to_many association always passes a > > table_alias in. > > And you are aliasing the model as well. That would certianly cause > this. > > > > I think the better solution would be to handle the situation inside > > > join_table, maybe by ignoring the explicit alias if there is an > > > implicit alias. What do you think? > > > Doing it in join_table sounds good to me. In my case, the implicit and > > explicit aliases are exactly the same. Perhaps the behavior should be > > ignoring the implicit alias and always using the explicit alias if given? > > Especially with eager_graph, that's what you'd want to do. Inside > join_table, we should check for either a symbol or an aliased > expression and remove any aliases. This needs to happen for both the > table being joined and the last joined table (which uses > the :implicit_qualifier option IIRC).
Try the patch at http://pastie.org/1114166.txt. I haven't had a chance to run it through the full test suite, but it certainly appears to work. I plan to push it to Github tomorrow after running it through the full test suite, but if you could give me any feedback on it, I'd appreciate it. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
