@@ -501,15 +501,15 @@ public virtual ILockingStrategy GetLockingStrategy(ILockable lockable, LockMode
501501 /// <returns> The appropriate for update fragment. </returns>
502502 public virtual string GetForUpdateString ( LockMode lockMode )
503503 {
504- if ( lockMode == LockMode . Upgrade )
504+ if ( Equals ( lockMode , LockMode . Upgrade ) )
505505 {
506506 return ForUpdateString ;
507507 }
508- if ( lockMode == LockMode . UpgradeNoWait )
508+ if ( Equals ( lockMode , LockMode . UpgradeNoWait ) )
509509 {
510510 return ForUpdateNowaitString ;
511511 }
512- if ( lockMode == LockMode . Force )
512+ if ( Equals ( lockMode , LockMode . Force ) )
513513 {
514514 return ForUpdateNowaitString ;
515515 }
@@ -526,14 +526,30 @@ public virtual string ForUpdateString
526526 get { return " for update" ; }
527527 }
528528
529- /// <summary> Is <tt>FOR UPDATE OF</tt> syntax supported? </summary>
530- /// <value> True if the database supports <tt>FOR UPDATE OF</tt> syntax; false otherwise. </value>
529+ /// <summary>Is <c>FOR UPDATE OF</c> syntax supported?</summary>
530+ /// <value><see langword="true"/> if the database supports <c>FOR UPDATE OF</c> syntax; <see langword="false"/> otherwise. </value>
531+ public virtual bool SupportsForUpdateOf
532+ // By default, just check UsesColumnsWithForUpdateOf. ForUpdateOf needs to be overriden only for dialects supporting
533+ // "For Update Of" on table aliases.
534+ => UsesColumnsWithForUpdateOf ;
535+
536+ /// <summary>Is <c>FOR UPDATE OF</c> syntax expecting columns?</summary>
537+ /// <value><see langword="true"/> if the database expects a column list with <c>FOR UPDATE OF</c> syntax,
538+ /// <see langword="false"/> if it expects table alias instead or do not support <c>FOR UPDATE OF</c> syntax.</value>
539+ // Since v5.1
540+ [ Obsolete ( "Use UsesColumnsWithForUpdateOf instead" ) ]
531541 public virtual bool ForUpdateOfColumns
532542 {
533543 // by default we report no support
534544 get { return false ; }
535545 }
536546
547+ public virtual bool UsesColumnsWithForUpdateOf
548+ #pragma warning disable 618
549+ // For avoiding a breaking change, we need to call the old name by default.
550+ => ForUpdateOfColumns ;
551+ #pragma warning restore 618
552+
537553 /// <summary>
538554 /// Does this dialect support <tt>FOR UPDATE</tt> in conjunction with outer joined rows?
539555 /// </summary>
@@ -567,11 +583,11 @@ public virtual string ForUpdateNowaitString
567583 }
568584
569585 /// <summary>
570- /// Get the <tt >FOR UPDATE OF column_list NOWAIT</tt > fragment appropriate
571- /// for this dialect given the aliases of the columns to be write locked.
586+ /// Get the <c >FOR UPDATE OF column_list NOWAIT</c > fragment appropriate
587+ /// for this dialect given the aliases of the columns or tables to be write locked.
572588 /// </summary>
573- /// <param name="aliases">The columns to be write locked. </param>
574- /// <returns> The appropriate <tt >FOR UPDATE colunm_list NOWAIT</tt > clause string. </returns>
589+ /// <param name="aliases">The columns or tables to be write locked.</param>
590+ /// <returns>The appropriate <c >FOR UPDATE colunm_or_table_list NOWAIT</c > clause string.</returns>
575591 public virtual string GetForUpdateNowaitString ( string aliases )
576592 {
577593 return GetForUpdateString ( aliases ) ;
0 commit comments