0

Master tables: assortments, companies, submission_types

Mapped assortments with company in assortments_companies.

Mapped submission_types with company in companies_submission_types.

Now I want to map assortments_companies with companies_submission_types.

Is it good to have a table name with rails convention like this assortments_companies_companies_submission_types? So my model name will be AssortmentCompanyCompanySubmissionType.

Is there any better approach to over come the lengthy name?

1
  • I think you should get an other name, then use has_many associations for companies_submission_types and assortments_companies Commented Jun 25, 2016 at 3:38

1 Answer 1

1

Very often many-to-many join tables between entities are really events, with extra attributes you want to track. Whenever I have a join table, I consider whether I can name it something more meaningful than just foos_bars. For instance between accounts and plans you don't have accounts_plans but subscriptions.

It is hard to suggest specific names without knowing your domain, but perhaps assortment_submissions or even just submissions?

Sign up to request clarification or add additional context in comments.

1 Comment

I will consider it for my current situation :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.