﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on Advance: Extending NHibernate Proxies</title><description>@Alessandro
  
Yes, it would.
  
The difference is that you would need to handle the ActiveRecordStarter event for models created and modify the Configuration object to register the new proxy factory, and  then NH will handle everything else.
</description><link>http://ayende.com/2321/advance-extending-nhibernate-proxies#comment5</link><guid>http://ayende.com/2321/advance-extending-nhibernate-proxies#comment5</guid><pubDate>Fri, 27 Apr 2007 18:07:50 GMT</pubDate></item><item><title>Harald commented on Advance: Extending NHibernate Proxies</title><description>i don't see that much of an advantage if not all instances of a certain class behave the same, i.e. implement INotifyPropertyChanged. if i need to distinguish between new an persistent objects what is the gain?
</description><link>http://ayende.com/2321/advance-extending-nhibernate-proxies#comment4</link><guid>http://ayende.com/2321/advance-extending-nhibernate-proxies#comment4</guid><pubDate>Thu, 19 Apr 2007 14:14:36 GMT</pubDate></item><item><title>Alessandro Cavalieri commented on Advance: Extending NHibernate Proxies</title><description>Does this work with ActiveRecord too?
  
  
if yes, could you give me 2 rows of example on how can I use it?
  
  
Thanks
  
Alessandro
</description><link>http://ayende.com/2321/advance-extending-nhibernate-proxies#comment3</link><guid>http://ayende.com/2321/advance-extending-nhibernate-proxies#comment3</guid><pubDate>Wed, 18 Apr 2007 10:44:35 GMT</pubDate></item><item><title>Ayende Rahien commented on Advance: Extending NHibernate Proxies</title><description>Yes, it would be easy to create InterceptableProxyFactory.
  
And this example would work for other access strategies, because I am not trying to raise an event when NH is changing the value, I am raising the event whenever the property is changed by YOUR code.
</description><link>http://ayende.com/2321/advance-extending-nhibernate-proxies#comment2</link><guid>http://ayende.com/2321/advance-extending-nhibernate-proxies#comment2</guid><pubDate>Tue, 17 Apr 2007 10:26:44 GMT</pubDate></item><item><title>Andris Kurmis commented on Advance: Extending NHibernate Proxies</title><description>Would it be hard to create some "generic" InterceptableProxyFactory, that is configurable from outside with a list of additional interfaces and a list of interceptors that implement methods like PreIntercept (basicly the code before "object result = base.Intercept(invocation, args);"  and PostIntercept (after that)?
  
  
And another question (sorry -- I am not fluent with NHibernate internals) -- would your example work with "nosetter" or "field" strategies as well?
  
  
Thanks,
  
andyqp
</description><link>http://ayende.com/2321/advance-extending-nhibernate-proxies#comment1</link><guid>http://ayende.com/2321/advance-extending-nhibernate-proxies#comment1</guid><pubDate>Tue, 17 Apr 2007 10:25:03 GMT</pubDate></item></channel></rss>