Skip to content

Commit bd09c46

Browse files
committed
Merge pull request #425 from graemefoster/allow-updates-to-be-ordered
NH-3783 - Expose the existing IsOrderUpdatesEnabled property via configuration.
2 parents c13f70d + c80625f commit bd09c46

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/NHibernate/Cfg/Environment.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ public static string Version
177177
/// <summary> Enable ordering of insert statements for the purpose of more effecient batching.</summary>
178178
public const string OrderInserts = "order_inserts";
179179

180+
/// <summary> Enable ordering of update statements for the purpose of more effecient batching.</summary>
181+
public const string OrderUpdates = "order_updates";
182+
180183
public const string QueryModelRewriterFactory = "query.query_model_rewriter_factory";
181184

182185
/// <summary>

src/NHibernate/Cfg/SettingsFactory.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ public Settings BuildSettings(IDictionary<string, string> properties)
236236
log.Info("Order SQL inserts for batching: " + EnabledDisabled(orderInserts));
237237
settings.IsOrderInsertsEnabled = orderInserts;
238238

239+
bool orderUpdates = PropertiesHelper.GetBoolean(Environment.OrderUpdates, properties, false);
240+
log.Info("Order SQL updates for batching: " + EnabledDisabled(orderUpdates));
241+
settings.IsOrderUpdatesEnabled = orderUpdates;
242+
239243
bool wrapResultSets = PropertiesHelper.GetBoolean(Environment.WrapResultSets, properties, false);
240244
log.Debug("Wrap result sets: " + EnabledDisabled(wrapResultSets));
241245
settings.IsWrapResultSetsEnabled = wrapResultSets;

0 commit comments

Comments
 (0)