views:

654

answers:

1

NHibernate provides us with ORM capabilities. Part of NHibernate generates queries based on mappings and HQL (or ICriteria). I'm wondering if it is possible to use NHibernate for generating queries against databases without using its ORM capabilities.

I'm trying to provide customers with custom access to their database. Since the schema of such database is unknown at design time queries need to be generated based on the configuration of a customer (including filtering through WHERE clauses).

Does anyone have experience with using NHibernate's (or other ORM) querying ability for custom SQL generation?

+1  A: 

Look at the tools around hibernate that generate hibernate classes from ddl, or the reverse, like hbm2ddl.

tpdi
Any sample code about those tools and hbm2ddl, ddl, misters ??
alhambraeidos