When NHibernate logs its SQL, it uses aliases for all the columns it retrieves e.g.
SELECT menuitems0_.menuSectionId as menuSect6_1_
I was just wondering if it’s possible to omit the alias information to make the SQL a bit clearer e.g.
SELECT menuitems.menuSectionId
This would help a lot when I am doing a demonstration to other people, as it will be easier to show them what NHibernate is doing under the hood.
Thanks
I don’t think it is possible to remove aliases but you can make output look a lot nicer if you use ‘FormatSql’ option. Set it to true when configuring session factory
So the output would look like this:
Or use NHibernate Profiler for demo purposes.