Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top