protected override SelectStatement GenerateReturningSql(DbModificationCommandTree tree, DbExpression returning) { SelectStatement select = base.GenerateReturningSql(tree, returning); ListFragment where = new ListFragment(); where.Append(" row_count() > 0 and "); where.Append( ((System.Data.Common.CommandTrees.DbUpdateCommandTree)tree).Predicate.Accept(this) ); select.Where = where; return select; }