Simulate table inheritance

Hi to everybody!

I’m newbie on yii.

I have this question:

with doctrine we can simulate table inheritance. For example if we use the concrete table inheritance strategy with tables documents, invoices and notes, with invoices and notes extend documents we obtain 3 class model: Documents with some fields, and Invoices and Notes with some fields plus fields of Documents.

When we get all documents, doctrine create an objects collection with correct instances type for every records (if we have 3 invoices and 1 notes, in collection we have 3 instances of invoices and 1 of notes).

It is possible use this strategy with yii active record pattern?

Best regards!

p.s.

sorry for my bad english.

Yes, it’s called single table inheritance and was already discussed:

http://www.yiiframework.com/forum/index.php?/topic/15557-activereocrd-and-table-inheritance/

Thank you samdark!

Tomorrow I will study your link.

Best regards!