Look up 'Liskov Substitution Principle', and you will see what they mean. Its can be found using Google, or often in the .NET world as one of the SOLID principles, as described by Uncle Bob.
/M >-----Original Message----- >From: [email protected] [mailto:[email protected]] On Behalf >Of Victor Rosenberg >Sent: Wednesday, September 30, 2009 10:22 AM >To: nhusers >Subject: [nhusers] Polymorphic vs Proxies vs Design > > >Hey everybody >I have a class - lets call it AbstractAccuracy that has about 5 >different classes deriving from it, one of them is called Accuracy. >One of my other classes has an AbstractAccuracy property. >Now, everything's fine, when I load the class, the property holds a >reference to a AbstractAccuracyProxy and I am fine with that. The >question is what do I do with it, because it is not castable to the >Accuracy class that I actually need... And I don't even know what >derived class do I have in my hands... >I can disable lazy loading, I can use eager loading, but isn't there >some other better solution? > >In the NHibernate in action book, on a page 202 that addresses this >issue, and it says "Truly object oriented code shouldnt use is or >numerous typecasts. If you find yourself running into problems with >proxiesm you should question your design, asking whether there is a >more polymorphic approach". What do they mean? > > >Thanks in advance >Victor > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
