Петр Москвин Fri Dec 10 14:33:29 -0500 2010

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:)


Петр Москвин Sat Dec 18 09:42:10 -0500 2010

Please reply. You forgot about me?

Kien La Tue Dec 21 18:23:58 -0500 2010

Hey sorry for not replying sooner but php-activerecord does not currently support polymorphic associations.

Петр Москвин Wed Dec 22 02:03:18 -0500 2010

And the plans are there? If so, how will it look?

Benjamin Payne Fri Aug 01 13:07:22 -0400 2014

I would like to know the answer to this as well!

(1-4/4)