Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30054/src/NHibernate/Persister
Modified Files:
Tag: alpha_avalon-proxy
AbstractEntityPersister.cs
Log Message:
commit on the avalon-proxy branch of a semi-working (no serialization) of
proxies yet.
Index: AbstractEntityPersister.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/AbstractEntityPersister.cs,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -C2 -d -r1.26 -r1.26.2.1
*** AbstractEntityPersister.cs 21 Sep 2004 09:58:24 -0000 1.26
--- AbstractEntityPersister.cs 27 Sep 2004 03:42:02 -0000 1.26.2.1
***************
*** 650,672 ****
// PROXIES
System.Type pi = model.ProxyInterface;
! hasProxy = pi!=null;
ArrayList pis = new ArrayList();
! pis.Add(typeof(HibernateProxy));
! //pis.Add( typeof(INHibernateProxy) );
! // != null because we use arraylist instead of hashset
! // mono does not like a null value passed into Equals()
! if ( pi!=null && !mappedClass.Equals(pi) )
{
! pis.Add(pi);
}
concreteProxyClass = pi;
! if (hasProxy)
{
! foreach(Subclass sc in model.SubclassCollection)
{
pi = sc.ProxyInterface;
! if (pi==null) throw new MappingException( "All subclasses must also have proxies: " + mappedClass.Name);
! if ( !sc.PersistentClazz.Equals(pi) ) pis.Add(pi);
}
}
--- 650,686 ----
// PROXIES
System.Type pi = model.ProxyInterface;
! hasProxy = ( pi!=null );
ArrayList pis = new ArrayList();
! pis.Add( typeof(INHibernateProxy) );
!
! // mono does not like a null value passed into Equals() so check
! // that first
! if( pi!=null && !mappedClass.Equals(pi) )
{
! // if the <class> name="type" is not the same type as the proxy="type"
! // then add the proxy's type to the list. They will
! // be different types when the <class> is a class and the proxy is
! // an interface, or when a <class> is an interface and the proxy interface
! // is diff (why would you do that??). They will be the same type
! // when the <class> is an interface and the proxy interface is the same
! // interface.
! pis.Add( pi );
}
+
concreteProxyClass = pi;
! if( hasProxy )
{
! foreach( Subclass sc in model.SubclassCollection )
{
pi = sc.ProxyInterface;
! if( pi==null )
! {
! throw new MappingException( "All subclasses must also have proxies: " + mappedClass.Name);
! }
! if( !sc.PersistentClazz.Equals(pi) )
! {
! pis.Add(pi);
! }
}
}
|