This project is read-only.

Model Inheritance

Topics: Troubleshooting, Writing modules
Aug 23, 2011 at 7:12 PM

Hi guys,

I'd like some helps with Model Inheritance. I have a SpecialTextRecord class which has different of TextType. To make the implementation clear, I create Testimonial extends SpecialTextRecord with the TextType is set to 1 whenever a new manager is created. The new record of a new manager is inserted inside SpecialTextRecord. 

Orchard nicely creates a SpecialTextRecord table inside the database for me. However, when I run the application, it asks for the Korchard.Testimonial which does not exists.

Is there a way I can tell Orchard that this table should be recognized as SpecialTextRecord?

Please help

Thanks in advance

Aug 23, 2011 at 7:18 PM

I'm not sure. Orchard favors composition over inheritance (a lot) and I'm really not sure how well that plays with that sort of pattern.

Aug 23, 2011 at 7:57 PM

Thanks :) You are very quick at replying. I will try to find a way