If it wasn't part of a legacy code base I suspect changing the field name to a much more standard model_id would probably help, but that would force a lot of changes to a legacy application so sadly not really an option for me :(.
On Friday, 12 October 2018 10:12:27 UTC-7, Stephen Weil wrote: > > I experienced something similar where we had a column named :model in one > of our tables, and whenever I tried to call something like > Model.first.model, it returned Model (the class). In our case it wasn't a > foreign key, so we could get around it by creating an alias that did > instance.values[:model]. Not sure how this works out when eager/eager_graph > comes into the picture, but I'm guessing that while calling the > association, Sequel is trying to call device_instance.model to get the ID > to match up with the eager-loaded device_model_instance, and is receiving > Device instead of an id. I am curious to see what the actual problem is and > what the best solution for this problem is, hopefully Jeremy or someone > else can help better than I. > -- 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 sequel-talk+unsubscr...@googlegroups.com. To post to this group, send email to sequel-talk@googlegroups.com. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.