Affects Version/s: 1.2.2
Fix Version/s: None
I want to talk about the inheritance, simple type and columns_aggregation.
To sum up : The parent class is Show, and the sub-classes are Video and Playlist.
- A Show have a title.
- A Video have a filename.
- A Playlist have a user.
The problem that appear with the generated models, Is that the following code is working.
$playlist = Doctrine_Core::getTable ("Model_Playlist")->find (3);
Or, the POO concept want that the filename property doesn't exist/available on a Playlist object. And Doctrine should throw an Exception ! Or, It is not the case.
The solution is to move the generated code of the sub-classes into there own classes.
Here the complete solution : http://pastebin.com/LzTG10P7
The problem with the one-to-one or many-to-many relationship is still the same.
The solution is more POO compliant.