var calls = _session.Query<CallTable>()
.Where(x => x.Rated == (short)0)
.ToList();
This sql is being generated:
select <....>
from [CallTable] cdrcalltmp0_
where cdrcalltmp0_.ClientId = 526 /* @p0 */
and cast(cdrcalltmp0_.Rated as INT) = 0 /* @p1 */
Rated は、データベース内の smallint です。short と比較するために smallint を int にキャストするのはなぜですか?