Skip to content

Commit c40e500

Browse files
committed
minor
SVN: trunk@3216
1 parent c56380e commit c40e500

5 files changed

+11
-16
lines changed

src/NHibernate/Action/BulkOperationCleanupAction.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
using System;
2+
using System.Collections;
23
using Iesi.Collections;
34
using Iesi.Collections.Generic;
45
using NHibernate.Engine;
56
using NHibernate.Persister.Entity;
6-
using System.Collections;
7-
using NHibernate.Util;
87

98
namespace NHibernate.Action
109
{

src/NHibernate/Action/CollectionAction.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,15 @@ public virtual int CompareTo(CollectionAction other)
160160
else
161161
{
162162
//then by fk
163-
return persister.KeyType.Compare(key, other.key, EntityMode.Poco);
163+
return persister.KeyType.Compare(key, other.key, session.EntityMode);
164164
}
165165
}
166166

167167
#endregion
168168

169169
public override string ToString()
170170
{
171-
// TODO: H3.2 Different behaviour (use persister istead collectionRole)
172-
return StringHelper.Unqualify(GetType().FullName) + MessageHelper.InfoString(persister, key);
171+
return StringHelper.Unqualify(GetType().FullName) + MessageHelper.InfoString(collectionRole, key);
173172
}
174173

175174
#region IDeserializationCallback Members

src/NHibernate/Action/CollectionUpdateAction.cs

-5
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,5 @@ public override void Execute()
6363
Session.Factory.StatisticsImplementor.UpdateCollection(Persister.Role);
6464
}
6565
}
66-
67-
public override int CompareTo(CollectionAction other)
68-
{
69-
return 0;
70-
}
7166
}
7267
}

src/NHibernate/Action/EntityAction.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
using System.Runtime.Serialization;
44
using NHibernate.Engine;
55
using NHibernate.Persister.Entity;
6+
using NHibernate.Util;
7+
using NHibernate.Impl;
68

79
namespace NHibernate.Action
810
{
@@ -95,7 +97,7 @@ public object[] PropertySpaces
9597

9698
public void BeforeExecutions()
9799
{
98-
throw new HibernateException("BeforeExecutions() called for non-collection action");
100+
throw new AssertionFailure("BeforeExecutions() called for non-collection action");
99101
}
100102

101103
public abstract void Execute();
@@ -143,5 +145,10 @@ void IDeserializationCallback.OnDeserialization(object sender)
143145
}
144146

145147
#endregion
148+
149+
public override string ToString()
150+
{
151+
return StringHelper.Unqualify(GetType().FullName) + MessageHelper.InfoString(entityName, id);
152+
}
146153
}
147154
}

src/NHibernate/Action/EntityUpdateAction.cs

-5
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,5 @@ private bool PreUpdate()
193193
}
194194
return veto;
195195
}
196-
197-
public override int CompareTo(EntityAction other)
198-
{
199-
return 0;
200-
}
201196
}
202197
}

0 commit comments

Comments
 (0)