Just found this post with the same issue:
http://forum.hibernate.org/viewtopic.php?t=985304
Should have searched harder I guess.
Anyway, it appears that ISession.Get will throw an exception if the object cannot be found. This isn't really the behavior I want, I would rather have null returned. So, I devised this method which solves my before-mentioned filtering problem, and it won't throw an exception if the object can't be found.
T GetByID<T>( object id )
{
IList<T> items = _session.CreateCriteria( typeof( T ) )
.Add( Expression.Eq( "id", id ) )
.List<T>();
if ( items.Count > 0 ) return items[ 0 ];
else return default( T );
}
NHibernate will substitute "id" for whatever the ID of your class is. I don't know how this would work with composite keys, but it definitely works for my boring single-column-surrogate-key tables.
Hopefully this helps somebody in the future.