Commits

Roger Kratz committed ad0bbf6

upgrading to envers 1.3

  • Participants
  • Parent commits 49803f1
  • Tags 1.3GA

Comments (0)

Files changed (3)

File NHibernate.Envers.SetForNet4/CollectionProxyMapperFactoryForNet4.cs

 using NHibernate.Envers.Configuration.Metadata;
 using NHibernate.Envers.Entities.Mapper;
 using NHibernate.Envers.Entities.Mapper.Relation;
-using NHibernate.Envers.Entities.Mapper.Relation.Lazy.Proxy;
 
 namespace NHibernate.Envers.SetForNet4
 {
 	public class CollectionProxyMapperFactoryForNet4 : DefaultCollectionMapperFactory
 	{
-		//change this when https://nhibernate.jira.com/browse/NHE-82 is fixed
-		private readonly IEnversProxyFactory proxyFactory = new DefaultEnversProxyFactory();
-
-		public override IPropertyMapper Set<T>(CommonCollectionMapperData commonCollectionMapperData, MiddleComponentData elementComponentData)
+		public override IPropertyMapper Set<T>(IEnversProxyFactory enversProxyFactory, CommonCollectionMapperData commonCollectionMapperData, MiddleComponentData elementComponentData)
 		{
-			return new SetForNet4CollectionMapper<T>(proxyFactory, commonCollectionMapperData, elementComponentData);
+			return new SetForNet4CollectionMapper<T>(enversProxyFactory, commonCollectionMapperData, elementComponentData);
 		}
 	}
 }

File NHibernate.Envers.SetForNet4/SetForNet4CollectionInitializor.cs

-using System;
-using System.Collections;
+using System.Collections;
 using System.Collections.Generic;
 using NHibernate.Envers.Configuration;
 using NHibernate.Envers.Entities.Mapper.Relation;
 {
 	public class SetForNet4CollectionInitializor<T> : AbstractCollectionInitializor<ISet<T>>
 	{
-		private readonly MiddleComponentData elementComponentData;
+		private readonly MiddleComponentData _elementComponentData;
 
 		public SetForNet4CollectionInitializor(AuditConfiguration verCfg,
 		                                       IAuditReaderImplementor versionsReader,
 		                                       MiddleComponentData elementComponentData) 
 			:base(verCfg, versionsReader, queryGenerator, primaryKey, revision)
 		{
-			this.elementComponentData = elementComponentData;
+			_elementComponentData = elementComponentData;
 		}
 
 		protected override ISet<T> InitializeCollection(int size) 
 
 		protected override void AddToCollection(ISet<T> collection, object collectionRow) 
 		{
-			var elementData = ((IList) collectionRow)[elementComponentData.ComponentIndex];
+			var elementData = ((IList) collectionRow)[_elementComponentData.ComponentIndex];
 
 			// If the target entity is not audited, the elements may be the entities already, so we have to check
 			// if they are maps or not.
 			var elementDataAsDic = elementData as IDictionary;
 			if (elementDataAsDic!=null) 
 			{
-				element = (T)elementComponentData.ComponentMapper.MapToObjectFromFullMap(EntityInstantiator, elementDataAsDic, null, Revision);
+				element = (T)_elementComponentData.ComponentMapper.MapToObjectFromFullMap(EntityInstantiator, elementDataAsDic, null, Revision);
 			} 
 			else 
 			{

File lib/NHibernate.Envers.dll

Binary file modified.