On Thursday, May 12, 2016 at 9:26:26 AM UTC-7, Satyanarayana Gandham wrote: > > Hi, > > I am trying to create a class whose information is in two separate tables. > The class's dataset is a joined dataset(because information is in two > separate tables). Is it possible? Can I create a class whose dataset is a > joined dataset. >
Yes: ds = DB[:a].join(:b, :id=>:b_id) class JoinedModel < Sequel::Model(ds) end Such a model is read-only though, deleting/updating/inserting would not work. 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 https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
