0

when I have a HasAndBelongsToMany relation between to tables, automigration creates a new table with and id property, how can I prevent to create that?

For example:

Assembly

id: number name: string

Part

id: number name: string

AssemblyParts (automatic created table)

id: number assemblyId: number partId: number

I don't what the id property in the AssemblyParts table.

Camilo Soto
  • 489
  • 7
  • 14

1 Answers1

0

I doubt you can, this is a generic solution and some databases enforce/encourage to have an ID in binding tables for unique rows. This is not a major problem for you, is it?

Undrium
  • 2,558
  • 1
  • 16
  • 24