Welcome Guest Search | Active Topics | Log In | Register

NHibernate Options
davidmccallum
#1 Posted : Tuesday, November 13, 2007 8:26:01 AM
Rank: Team VistaDB

Groups: Member, Team VistaDB

Joined: 8/13/2006
Posts: 608
Points: 2,583
Location: Edinburgh, Scotland
Is anyone using NHibernate with VistaDB that would be prepared to guiding me through it with simple example etc...
js_vistadb
#2 Posted : Tuesday, November 13, 2007 9:48:55 AM
Rank: VistaDB Staff

Groups: Administration, VistaDB Staff

Joined: 8/13/2006
Posts: 3,633
Points: 5,124
Location: Mount Dora, Florida
I have had several people email / PM me with notes saying they are using NHibernate. And I had one person who was going to email their provider... But I don't have a single one yet. So if someone who is using NHibernate would like to post, please feel free to do it.

Jason
Jason Short

intesoft
#3 Posted : Wednesday, December 05, 2007 2:38:39 PM
Rank: Member

Groups: Member

Joined: 9/10/2006
Posts: 15
Points: 0
I finally got round to setting this up on CodePlex:

http://www.codeplex.com/NHibernateVistaDB

Let me know if you need any help getting setup with the NHibernate tests etc... and I'll put together some instructions.

Also, I copied a bit of info about VistaDB from the home-page - let me know if this is / isn't acceptable and I can remove it if needed.

Regards
- Simon
js_vistadb
#4 Posted : Wednesday, December 05, 2007 3:43:02 PM
Rank: VistaDB Staff

Groups: Administration, VistaDB Staff

Joined: 8/13/2006
Posts: 3,633
Points: 5,124
Location: Mount Dora, Florida
Hi Simon, you are fine. I couldn't download it from the page though, do you have to login first or something?

Jason
Jason Short

intesoft
#5 Posted : Wednesday, December 05, 2007 4:52:12 PM
Rank: Member

Groups: Member

Joined: 9/10/2006
Posts: 15
Points: 0
You shouldn't have to login ... I can still download it when I've logged out of CodePlex (I'll try it from my home machine as well just to make sure though).

Cheers
- Simon
davidmccallum
#6 Posted : Wednesday, December 05, 2007 11:39:19 PM
Rank: Team VistaDB

Groups: Member, Team VistaDB

Joined: 8/13/2006
Posts: 608
Points: 2,583
Location: Edinburgh, Scotland
Simon,

Thanks for the link. I'm up to my eyes just now, so won't be able to research it for a while yet.
davidmccallum
#7 Posted : Saturday, December 08, 2007 2:57:13 AM
Rank: Team VistaDB

Groups: Member, Team VistaDB

Joined: 8/13/2006
Posts: 608
Points: 2,583
Location: Edinburgh, Scotland
Simon,

Just downloaded and tried to build, first error I'm getting is
Code:
Error    2    Cryptographic failure while signing assembly 'C:\Users\David\Documents\Visual Studio 2008\Projects\NHibernate.VistaDBDriver\obj\Debug\NHibernate.VistaDBDriver.dll' -- 'Error reading key file '../../src/NHibernate.snk' -- The system cannot find the path specified. '    NHibernate.VistaDBDriver


I'm a total C# newbie, coming from a Java/Foxpro background, so I would be grateful if you can tolerate even the most basic questions
intesoft
#8 Posted : Saturday, December 08, 2007 10:15:05 AM
Rank: Member

Groups: Member

Joined: 9/10/2006
Posts: 15
Points: 0
No problem :)

If you unzip the souce for NHibernate (from the NHibernate download) you should end up with a src folder with all the NHibernate projects in it.

The NHibernate.VistaDB folder needs to go in that as shown in the attached screenshot.

If you then open the main NHibernate build file (default.build) that is in the root folder you can include the new driver in the build:

Code:

    <fileset id="buildfiles.all" basedir="src">
        <!-- Files have to be in dependency order -->
        <include name="HashCodeProvider/HashCodeProvider.build" />
        <include name="Iesi.Collections/Iesi.Collections.build" />
        <include name="Iesi.Collections.Test/Iesi.Collections.Test.build" />
        <include name="NHibernate/NHibernate.build" />
        <include name="NHibernate.DomainModel/NHibernate.DomainModel.build" />
        <include name="NHibernate.Test/NHibernate.Test.build" />
        <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build" />
        <include name="NHibernate.Examples/NHibernate.Examples.build" />
        <include name="NHibernate.Caches.SysCache/NHibernate.Caches.SysCache.build" />
        <include name="NHibernate.Caches.SysCache2/NHibernate.Caches.SysCache2.build" />
        <include name="NHibernate.Caches.SysCache.Tests/NHibernate.Caches.SysCache.Tests.build" />
        <include name="NHibernate.Caches.MemCache/NHibernate.Caches.MemCache.build" />
        <include name="NHibernate.Caches.MemCache.Tests/NHibernate.Caches.MemCache.Tests.build" />
        <include name="NHibernate.Caches.Prevalence/NHibernate.Caches.Prevalence.build" />
        <include name="NHibernate.Caches.Prevalence.Tests/NHibernate.Caches.Prevalence.Tests.build" />
        <include name="NHibernate.JetDriver/NHibernate.JetDriver.build" />
        [b]<include name="NHibernate.VistaDBDriver/NHibernate.VistaDBDriver.build" />[/b]
        <include name="NHibernate.Mapping.Attributes/NHibernate.Mapping.Attributes.build" />
        <include name="NHibernate.Mapping.Attributes.Test/NHibernate.Mapping.Attributes.Test.build" />
        <include name="NHibernate.Tasks/NHibernate.Tasks.build" />
        <include name="NHibernate.Tool.hbm2net/NHibernate.Tool.hbm2net.build" />
        <include name="NHibernate.Tool.hbm2net.Console/NHibernate.Tool.hbm2net.Console.build" />
        <include name="NHibernate.Tool.hbm2net.Tests/NHibernate.Tool.hbm2net.Tests.build" />
        <include name="NHibernate.UserTypes.Oracle/NHibernate.UserTypes.Oracle.build" />
        <include name="NHibernate.UserTypes.SqlTypes/NHibernate.UserTypes.SqlTypes.build" />
        <include name="Nullables/Nullables.build" />
        <include name="Nullables.NHibernate/Nullables.NHibernate.build" />
        <include name="Nullables.Tests/Nullables.Tests.build" />
        <include name="NHibernate.UserTypes.Tests/NHibernate.UserTypes.Tests.build" />
    </fileset>

    <fileset id="buildfiles.tests" basedir="src">
        <include name="Iesi.Collections.Test/Iesi.Collections.Test.build" />
        <include name="NHibernate.Test/NHibernate.Test.build" />
        <include name="NHibernate.Test.Performance/NHibernate.Test.Performance.build"
            if="${run.performance.tests}" />
        <include name="NHibernate.Caches.SysCache.Tests/NHibernate.Caches.SysCache.Tests.build" />
        <include name="NHibernate.Caches.Prevalence.Tests/NHibernate.Caches.Prevalence.Tests.build" />
        <include name="NHibernate.Mapping.Attributes.Test/NHibernate.Mapping.Attributes.Test.build" />
        <include name="NHibernate.Tool.hbm2net.Tests/NHibernate.Tool.hbm2net.Tests.build" />
        <include name="NHibernate.UserTypes.Tests/NHibernate.UserTypes.Tests.build" />
        <include name="Nullables.Tests/Nullables.Tests.build" />
    </fileset>


Run NAnt from the root (where this build file is) and it will do the actual build for you.

There does appear to be some support for putting the database connection details to use when running unit tests within an XML file (in build-common/NHibernate-properties.xml) but I couldn't get that working so I just edited the NHibernate.Test.dll.config that was copied to the output folder and ran the unit tests from there.

My next job is to include the released assembly in the project together with instructions on how to setup and run the NHibernate unit tests against a VistaDB database.

Also, some of the tests take quite a while to run and memory usage gets pretty high so I may have to look at how the NHibernate tests are structured to make it close connections and clean up more often (I'll probably do this before I start working on the actual test failures as it speeds up the cycle).

Hope that explains things a little better ... let me know if I've missed anything though and I'll try and get it all packaged up better.

Cheers
- Simon
intesoft attached the following image(s):
nhibernate.JPG (62kb) downloaded 65 time(s).
davidmccallum
#9 Posted : Saturday, December 08, 2007 10:18:52 AM
Rank: Team VistaDB

Groups: Member, Team VistaDB

Joined: 8/13/2006
Posts: 608
Points: 2,583
Location: Edinburgh, Scotland
Whaaaaaaaaaa!

Flashbacks of EJB before xdoclett :)

OK, I'll look into that tomorrow, expect the next question then :)
intesoft
#10 Posted : Monday, December 10, 2007 3:40:56 PM
Rank: Member

Groups: Member

Joined: 9/10/2006
Posts: 15
Points: 0
Hi David

I'm part way through re-packaging this a little neater with some better instructions on running it. I'll also include the built assembly (NHibernate.VistaDBDriver.dll)

I'm also trying to get it to use an in-memory database while it executes the unit tests to see if that speeds it up.

Just so you don't spend too much time on it and then I change it on ya! :-)
davidmccallum
#11 Posted : Tuesday, December 11, 2007 12:19:36 AM
Rank: Team VistaDB

Groups: Member, Team VistaDB

Joined: 8/13/2006
Posts: 608
Points: 2,583
Location: Edinburgh, Scotland
Thanks, I didn't get a chance to look at anything on Sunday. Everything is on hold until the weekend now.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.3 | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.103 seconds.