I have a database with tables containers
and ports
.
The containers
table has two columns pol_id
and pod_id
that both point to the ports
table. The ports
table has an id
column.
I have tried using belongs_to / references
inside the migration but it does not provide such flexibility.
Also, I am a bit puzzled at configuring the models for this.