I have a table files
and it belongs to one either post
, article
, notion
or paragrah
. Maybe in the future, there will be more.
What relationship do you suggest to use? Multiple HABTM tables, or multiple columns (post_id
, aticle_id
,...)?
Or maybe two columns parent_alias
and parent_id
? But how to easily work with this in CakePHP?
Thanks for any suggestions!