Suppose site has a blog and news feed. They will need support comments. Create a module to each module comments - strange. Therefore, as I realized the table of comments:
id | item_type | item_id | text
Where item_type - NewsItem or Posts, as item_id contains id by records from tables news_items and posts.
How to write a polymorphic association? While only see the decision through _get (): (
PS: rubby can:)
Петр МосквинSat Dec 18 09:42:10 -0500 2010
Please reply. You forgot about me?
Kien LaTue Dec 21 18:23:58 -0500 2010
Hey sorry for not replying sooner but php-activerecord does not currently support polymorphic associations.
Subject: Polymorphic association
Suppose site has a blog and news feed. They will need support comments. Create a module to each module comments - strange. Therefore, as I realized the table of comments:
id | item_type | item_id | text
Where item_type - NewsItem or Posts, as item_id contains id by records from tables news_items and posts.
How to write a polymorphic association? While only see the decision through _get (): (
PS: rubby can:)