mercredi 31 juillet 2019

When polymorphic relation shouldn't be used?

Is it okay to use polymorphic relation when there are lets say 6 common columns and 2 columns with different names?

I need to track car maintenance and refueling.

maintenances - table

-date

-km_driven

-info (refers to maintenance info )

refuelings - table

-date

-km_driven

-amount (refers to amount in liters)

So, should i use polymorphic relationship or not? Is it ok if there are more different columns per model?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire