Another disadvantage is that situations with proxies can be a bit more difficult to debug because proxies don't quite behave like normal objects.
For example, If you load a Person proxy which is actually an Employee, then the expression "person is Employee" will return false because the PROXY isn't an employee instance. There are ways to get around these problems, and let me be clear that proxies are still worth it. But the quirks in their behavior are definitely a disadvantage. On Mon, Apr 20, 2009 at 10:49 PM, Hudson Akridge <[email protected]>wrote: > Advantages: Application will utilize lazy loaded objects more efficiently, > and perform significantly better in most general casesDisadvantages: > Everything not marked as private has to be overridable (Virtual, Abstract, > etc.). > > > On Mon, Apr 20, 2009 at 2:39 AM, Foltz <[email protected]> wrote: > >> >> hey. just curious. what's the advantages/disadvantages of using >> proxies for the objects? >> >> On Mar 24, 4:47 pm, James Gregory <[email protected]> wrote: >> > I do indeed, sorry about that. >> > >> > On 3/24/09, Paul Batum <[email protected]> wrote: >> > >> > > James, do you mean Not.LazyLoaded() ? >> > >> > > On Wed, Mar 25, 2009 at 8:24 AM, James Gregory >> > > <[email protected]>wrote: >> > >> > >> In your ClassMap, call LazyLoaded(). That should inform NHibernate >> that >> > >> you >> > >> don't want it to generate proxies for that particular entity. >> > >> > >> On Tue, Mar 24, 2009 at 8:38 PM, [email protected] < >> > >> [email protected]> wrote: >> > >> > >>> I'm new to Fluent NHibernate for I appologive if this is a newbe >> > >>> question with a simple answer. >> > >>> Is there a way using Fluent Nhibernate to map your classes such that >> > >>> you do not have to virtualize each method/property? >> > >> > >>> I don't mind having lazy loading for my collections, but prefer not >> to >> > >>> have NHibernate generate proxies for all my classes. >> > >> > >>> Thanks >> > >> > >>> Greg >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
