On Friday, December 7, 2012 10:51:17 AM UTC-8, Doug Tykocki wrote: > > Correct. Without the qualifier some of my eager and eager_graph queries > fail since it cannot find the table in the current database. A simplified > example of what I want to be able to: > > class Organization < Sequel::Model(DB1[:organizations]) > one_to_many :members, eager_graph: :files > end > > class Members < Sequel::Model(DB1[:members]) > one_to_many :files > many_to_one :organization > end > > class Files < Sequel::Model(DB2[:files]) > many_to_one :member > end > > I'll take a look at the Sequel code this weekend and see what I can come > up with. >
Eager loading using #eager shouldn't fail if the models use separate databases, but #eager_graph should fail since it has to do a join. In your simplified example, it looks like switching the "eager_graph: :files" to "eager: :files" would make things work, but I'm guessing that's not possible in your real world use-case (or else you would have chosen that path of lesser resistance). Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/LsA_AdyRm70J. 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.
