This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I'm trying to implement GOF Strategy pattern (http://img834.imageshack.us/i/raten.png/). On Product table I have referenced abstract table Rate. From Rate are inherited concrete Rate tables (SingleTableInheritance is used). Cannot create instance of BusinessLayer.Rate (does it have a public default constructor?) I understand it doesn't have public default constructor when it is abstract, but how can I implement this pattern?
Thanks Pooik |
|
|
Check your discriminator. It looks like LightSpeed is trying to create an instance of the base Rate class instead of one of the concrete derived classes, which probably means the discriminator value does not match that of any of the derived classes. |
|
|
Yes, that was the problem. I added row into db manually. Thank you. |
|