On Sat, Sep 4, 2021 at 5:41 PM John Knapp wrote:
> I have a standard many_to_ many with a model for the join table. The join
> table has an extra attribute, "quantity".
>
> class Plan < Sequel::Model
> many_to_many :capabilities
> end
>
> # join table with extra column "quantity"
> class Capa
Jeremy can answer authoritatively but AFAIK it does not exist and is a bit
of an oxymoron- "join tables" as Sequel defines them are just a compound
key; adding an additional attribute ceases to make them a join table.
I'm not going to explain why you should use a separate model for this since
yo
Thanks Rob, I actually have both but we can forget that model for the
moment. The join table has an additional column "quantity". My objective is
learning the correct sequel syntax to add a specified *quantity* of a given
capability (c) into a plan (p) while using the sequel add_*association*
m
To me, that seems like you'd want a separate model, not a join table. - Rob
On Saturday, September 4, 2021 at 5:41:11 PM UTC-7 John Knapp wrote:
> I have a standard many_to_ many with a model for the join table. The join
> table has an extra attribute, "quantity".
>
> class Plan < Sequel::Model
I have a standard many_to_ many with a model for the join table. The join
table has an extra attribute, "quantity".
class Plan < Sequel::Model
many_to_many :capabilities
end
# join table with extra column "quantity"
class CapabilitiesPlans < Sequel::Model
end
class Capability < Sequel::Mode