Do you need to inject something in your entities?

2009/2/20 [email protected] <[email protected]>

>
> I would like to use Spring.Net to apply an introduction to certain
> objects that are loaded by NHibernate 2.0.1. I've attempted doing it
> in the PostLoad event.  The essence of what I'm doing in the listener
> is
>
>                ProxyFactory Factory = new ProxyFactory
> (@event.Entity);
>                AuditableAdvisor Advisor = new AuditableAdvisor();
>                Factory.AddIntroduction(Advisor);
>                Factory.AddAdvice(Advisor.AfterAdvice);
>                Factory.ProxyTargetType = true;
>
>                @event.Entity = Factory.GetProxy();
>
> but that doesn't quite cut it.  I've verified the the factory call
> above returns the proxied object, but the client, caller of the load
> method, never sees the proxy. Is this event the correct place to do
> that? If not, where. If so, what I'm I missing.  Thanks for reading.
>
>
> Cheers,
> Aeden
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to