Level 23
well for one you wont be able to use db fk but you can add indexes i believe using both en_id, en_type.. so i am not sure where that leaves you..
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
When it comes to polymorphic relationships are there any hits on performance vs. using standard relationships. Or are polymorphic relationships equally good? I have a case where I can merge 3 tables into one and make the relationships polymorphic instead of normal relationships.
How often does the rest of you like to use polymorphic relationships, as soon as the opportunity presents itself or do you try to avoid them?
Please or to participate in this conversation.