Generate migration – create join table

To autopopulate the create_join_table command in the command line, it should look like this: rails g migration CreateJoinTableProductsSuppliers products suppliers For a Product model and a Supplier model. Rails will create a table titled “products_suppliers”. Note the pluralization. (Side note that generation command can be shortened to just g)

Mapping many-to-many association table with extra column(s)

Since the SERVICE_USER table is not a pure join table, but has additional functional fields (blocked), you must map it as an entity, and decompose the many to many association between User and Service into two OneToMany associations : One User has many UserServices, and one Service has many UserServices. You haven’t shown us the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)