views:

94

answers:

2

Has anyone able to successfully used NHibernate with Oracle Lite,If yes can you tell me what do we need to mention in hibernate.cfg.xml , I mean which dialect and how do we connect to it. Thanks.

+1  A: 

Which version of NH you are using? It seems that this feature is quite new only implemented within the actual Aplha: 2.1.0.Alpha1.
Improvements:
* [NH-1644] - Oracle Lite Driver With Working Query Parameters

I haven't tried so i can not say what connection string to use but the dialect should be 'OracleLiteDialect' as the Alexandre Payment says here. The Jira issues are solved so it should be worth a try.

Please post the connection string if you were able to connect.

zoidbeck
A: 

The namespaces for Driver and Dialect classes are NHibernate.Driver and NHibernate.Dialect respectively. You can use Intellisense or Reflector to see exactly what is available.

A Session Factory configuration for Oracle Lite:

<property name="connection.connection_string">...</property>
<property name="connection.driver_class">NHibernate.Driver.OracleLiteDataClientDriver</property>
<property name="dialect">NHibernate.Dialect.OracleLiteDialect</property>

Oracle connection strings are described here.

Lachlan Roche