Should we allow other options for accessing the Session on which the query should be executed (e.g. SessionFactory#getCurrentSession), possibly as a configuration option for the generation?