Skip to content

Commit f4bc4d7

Browse files
committed
Revert "Modified ReferenceComponentMapping to pass visitors through to the underlying ExternalComponentMapping. Also modified ExternalComponentMapping to prevent it from running a visitor more than once."
This reverts commit 35609a0.
1 parent 9e5dbb6 commit f4bc4d7

File tree

4 files changed

+0
-94
lines changed

4 files changed

+0
-94
lines changed

src/FluentNHibernate.Specs/Conventions/PropertyConventionSpecs.cs

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/FluentNHibernate.Specs/FluentNHibernate.Specs.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@
135135
<Compile Include="Automapping\OverrideSpecs.cs" />
136136
<Compile Include="Conventions\BiDirectionalKeysSpecs.cs" />
137137
<Compile Include="Conventions\Fixtures\Parent.cs" />
138-
<Compile Include="Conventions\PropertyConventionSpecs.cs" />
139138
<Compile Include="PersistenceModel\Fixtures\UnionChildEntity.cs" />
140139
<Compile Include="PersistenceModel\Fixtures\UnionChildEntityMap.cs" />
141140
<Compile Include="PersistenceModel\Fixtures\UnionEntity.cs" />
Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using System;
2-
using FluentNHibernate.Visitors;
3-
using System.Collections.Generic;
42

53
namespace FluentNHibernate.MappingModel.ClassBased
64
{
@@ -17,18 +15,5 @@ public ExternalComponentMapping(ComponentType componentType)
1715
public ExternalComponentMapping(ComponentType componentType, AttributeStore underlyingStore)
1816
: base(componentType, underlyingStore)
1917
{}
20-
21-
private readonly IList<IMappingModelVisitor> previousVisitors = new List<IMappingModelVisitor>();
22-
23-
public override void AcceptVisitor(IMappingModelVisitor visitor)
24-
{
25-
// This external mapping might be shared amongst several ReferenceComponentMappings. Allowing a particular visitor to be applied to this component mapping
26-
// more than once can cause issues, so lets ensure that doesn't happen.
27-
if(previousVisitors.Contains(visitor))
28-
return;
29-
30-
previousVisitors.Add(visitor);
31-
base.AcceptVisitor(visitor);
32-
}
3318
}
3419
}

src/FluentNHibernate/MappingModel/ClassBased/ReferenceComponentMapping.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ public ReferenceComponentMapping(ComponentType componentType, Member property, T
3232
public void AcceptVisitor(IMappingModelVisitor visitor)
3333
{
3434
visitor.ProcessComponent(this);
35-
36-
if(mergedComponent != null)
37-
visitor.Visit(mergedComponent);
3835
}
3936

4037
public bool IsSpecified(string name)

0 commit comments

Comments
 (0)