dbpatterns icon indicating copy to clipboard operation
dbpatterns copied to clipboard

Polymorphic foreign keys

Open Anahkiasen opened this issue 10 years ago • 0 comments

Is it possible to show polymorphic foreign keys of that type, as done by Rails (Ruby) or Laravel (PHP) ?

column type
illustrable_type string
illustrable_id integer

I'm assuming this is not possible because SQL doesn't have any structure for it but as DBPatterns is more of a "representation" tool to me it'd seem logical to be allow to "show" that, maybe by specifying a list of entities in the foreign key field, like Book,Author or something.

Anahkiasen avatar Mar 05 '14 10:03 Anahkiasen