On Friday, December 5, 2014 8:59:43 AM UTC-8, Stefan Novak wrote:
>
> Hi all,
>
> I came across an edge-case where the many_through_many plugin fails to 
> work if you have tables that have a specified schema. For example:
>
> Tags.table_name = :myschema__tags
> Artist.table_name = :myschema__artists
> Artist.many_through_many :tags, [...]
> Artist.limit(1).eager(:tags).all.first.tags
>
>
> The resulting SQL will alias the join tables as `myschema__tags`, 
> `myschema__albums_artists`, etc. However, the association will will use the 
> qualified table name `myschema`.`albums_artists`.`artist_id`. This is using 
> the mysql2 gem.
>
> Is there a workaround to this?
>
> Let me know if the above example isn't clear -- I'd be happy to elaborate 
> more.
>

I've confirmed this is a bug in Sequel.  Can you test the patch at 
http://pastie.org/9763079 and let me know if it fixes it for you?

Thanks,
Jeremy 

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to