Catharsis and Oracle

Oct 6, 2008 at 2:23 PM

Only one question, can we use Catharsis with Oracle?

Oct 6, 2008 at 2:37 PM
Hi Delfwaren

Definitely YES! That's the essence of NHibernate (you'll love it)

Just create similar tables in your Oracle db and change only ONE THING! web.conifg:

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
        <session-factory name="SqlServer">
          <!-- SQL Server -->
          <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
          <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
          <property name="connection.connection_string">Data Source=.\SQL2005;Database=Project;Trusted_Connection=yes;</property>
          <!-- ORACLE -->
          <property name="dialect">NHibernate.Dialect.OracleDialect</property>
          <property name="connection.driver_class">NHibernate.Driver.OracleDataClientDriver</property>
          <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
          <property name="connection.connection_string">Data Source=dm;User ID=dm;Password=dm;</property>
          <mapping assembly="Catharsis.Entity" />
          <mapping assembly="Firm.Product.Data" />

That's all! It is wokring!
We did prove that Catharsis can cooperate with Oracle and DB2.

Good luck

Radim Köhler
Oct 6, 2008 at 2:45 PM
Thanks for your reply.

Here the packages I've installed to test Catharsis:

 - GuidanceAutomationToolkitForVS2008.msi
 - Catharsis.GuidanceSetup.msi

AspNetMVCPreview5-setup.msi one seems to be contained inside GuidanceAutomationToolkitForVS2008 one.

Do I need to install NHibernate 1.2.1.GA? I'd like to follow the CodeProject HowTo but at work, we only have Oracle.

> Just create similar tables in your Oracle db and change only ONE THING! web.conifg:

Where is located this file?

Oct 6, 2008 at 3:00 PM

1) if you want to run example application you do not have to install nothing - all needed libraries are appended.

2) If you'd like to play with Guidance (I suggest you to do it!) Then you need:
- AspNetMVCPreview5-setup.msi  (If not installed, VS disable to open the Web project)
GuidanceAutomationExtensions.exe  (this is must for any Guidance)
GuidanceAutomationToolkitForVS2008.msi (this is must for any Guidance development)

- Catharsis.Guidance.msi -> adds new item to Create solution, generates new entities

NHibernate 2.0 is bundled, you do not have to install anything (only you can copy NHibernate .xsd to your VS install directory among other .xsd)

There are some tables needed in Database to allow run Catharsis (roles, users, languages ...)
If you'll create new solution, separate folder with MS SQL scripts will be created for you.

If you want to use Oracle, you must convert these scripts to Oracle SQL syntax

And finally change web.config -> to inform NHibernate that Oracle is the storage

Go through all docs on for Catharsis
and play ... when you'll be familiar with Catharsis the time spent with playing will be beyond price...

Radim Köhler

Oct 6, 2008 at 3:06 PM
The goal is to understand this framework to use it for next Web-projects.

So I'll use the guidance tool.
I think I'm going to set up Sql Server at home to test it.

If any questions, I'll come back :)

Oct 7, 2008 at 6:39 AM
Hi again

There is new release 0.8.8 which you should download and play with!
When you'll create new project, in web.config you can find the commented oracle settings

We are not using Oracle - but maybe Catharsis in future (next) release can support switch SQL 2005 / Oracle when Creating new Solution...
We'll see.
Anyway: You can develop your kick off application with SQL 2005 (at home)
Then only transfer tables to your Oracle database and change NHibernate settings in web.config.

It will run ... !!!

And that's the real proof of multi-tier architecture!
Other layers will never realize that change...
Thanks to NHibernate team, tremendous job.

Enjoy Catharsis
Radim Köhler
Oct 7, 2008 at 8:33 AM

When I arrived at home, I downloaded the last hot-release.

But I did not remember Sql Server 2005 Enterprise couldn't be installed on Windows XP Pro...

So I'll get the Express one, hope it'll be OK with it.