Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Missing 'enhanced relation merges'? #263

Closed
gamov opened this issue Aug 1, 2013 · 1 comment
Closed

Missing 'enhanced relation merges'? #263

gamov opened this issue Aug 1, 2013 · 1 comment

Comments

@gamov
Copy link

gamov commented Aug 1, 2013

I've started migrating from Rails 3 (meta_where) to Rails 3.2 (Squeel) via Rails 3.1. Since Squeel is compatible with Rails 3, I figured I should migrate to it first, then move on to Rails 3.1

The first and very serious roadblock I found, is my extensive use of this mw feature:
https://github.com/ernie/meta_where#enhanced-relation-merges
which I suppose (based on Ernie's love of the merge method) will never be ported to Squeel.
The serious problem I'm facing here is that this beautiful feature was hiding a Rails bug in the merge() method (rails/rails#3002 ironically reported by me!) that ignored the joins context while merging, making the feature rather useless for any real-world application.
Without this bug, I could add manually all the joins that mw was adding for me. However with it, it makes all my merges with joins break (~180), making it not practical to do, especially knowing that the bug is fixed in 3.2
I guess, my only very daunting option is to try a combined migration from Rails 3 (mw) to Rails 3.2 (Squeel)...

I would like confirmation of it and leave a trace here for the next person.

All this makes me wonder if I should just give up on Squeel and use arel directly (bearing with its extremely poor documentation)...

Related mw issue: activerecord-hackery/meta_where#40
Edit: Looks like my homework was badly done: #79

@ernie
Copy link
Contributor

ernie commented Aug 28, 2013

@gamov I'm sorry, but that was a poorly-considered feature and won't be making a reappearance in Squeel. :(

@ernie ernie closed this as completed Aug 28, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants