sql - What is the recommendation on using NHibernate CreateSQLQuery? -


my gut tells me advanced nhibernate users against , have been looking actual analysis on , have found nothing, i'd answer address these questions:

what pros/cons of using it? there performance implications, both or bad (e.g. use call stored procedures?) in scenarios should use/avoid it? should use/avoid it?

basically, reasons use/avoid , why?

createsqlquery exists reason, executing queries either:

  • not supported
  • hard write

using of other methods.

of course it's last choice, because:

  • it's not object oriented (i.e. you're thinking of tables , columns instead of entities, properties , relationships)
  • it ties physical model
  • it ties specific rdbms
  • it forces more work in order retrieve entities
  • it doesn't automatically support features paging

but if think it's needed particular query, go ahead. make sure learn other methods first (hql, linq, queryover, criteria , get) avoid doing unnecessary work.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -