The most likely reason to me is that ORMLite does not view item.Id
as a constant. It sees that it's part of the object being updated, and uses its name, rather than its value.
You should be able to work around this issue by introducing a temporary variable, like this:
using (var o = Conn.OpenDbConnection()) {
var onlyFields = (x => x.LastLoggedIn);
vat itemId = item.Id;
var where = (x => x.Id == itemId);
return o.UpdateOnly(item, onlyFields, where);
}
Now ORMLite would have no visibility into itemId
, so it would have no other choices except using its value as a constant or introducing a parameter for it.