1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

Don't use alias for group by

This commit is contained in:
Mark McDowall 2013-05-30 22:15:21 -07:00
parent c94595b3ae
commit 1e4b7b033d
2 changed files with 1 additions and 2 deletions

View File

@ -154,7 +154,7 @@ private void BuildGroupBy(StringBuilder sql)
var baseTable = _innerQuery.Tables.First(); var baseTable = _innerQuery.Tables.First();
var primaryKeyColumn = baseTable.Columns.Single(c => c.ColumnInfo.IsPrimaryKey); var primaryKeyColumn = baseTable.Columns.Single(c => c.ColumnInfo.IsPrimaryKey);
string token = _innerQuery.Dialect.CreateToken(string.Concat(baseTable.Alias, ".", _innerQuery.NameOrAltName(primaryKeyColumn.ColumnInfo))); string token = _innerQuery.Dialect.CreateToken(string.Concat(baseTable.Alias, ".", primaryKeyColumn.ColumnInfo.Name));
sql.AppendFormat(" GROUP BY {0}", token); sql.AppendFormat(" GROUP BY {0}", token);
} }
} }

View File

@ -62,7 +62,6 @@ public EpisodeService(IProvideEpisodeInfo episodeInfoProxy, ISeasonRepository se
_logger = logger; _logger = logger;
} }
public Episode GetEpisode(int id) public Episode GetEpisode(int id)
{ {
return _episodeRepository.Get(id); return _episodeRepository.Get(id);