Hello. I see that it is almost possible for sequel to work with multiple
databases. But I've found a design issue.
db.create_table :authors do
db.create_table :books do
db.create_table :authors_books do
foreign_key :author_id, :authors
foreign_key :book_id, :books
authors = Class.new Sequel::Model(db[:authors]) do
books = Class.new Sequel::Model(db[:books]) do
We can see the following error:
uninitialized constant Book (this happened when attempting to find the
associated class for
Sequel wants "::Book" class. But it is not possible to provide such class
in global scope if we want to maintain multiple Books classes for multiple
db client instances. Book could be defined in db scope, not in global
scope. How to solve such question? Should I create a github issue?
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.