I'm working with legacy databases in which we have six or so databases on a 
single instance of SQL Server 2005. Don't laugh... when I first came on the 
databases were on different servers. The schemas are still a grand pain in 
the neck sometimes.

Anyway, I was looking for an easier mechanism to verify our mapping files 
and to provide some form of deterministic unit testing; e.g., creating the 
database structures on the fly rather than attempting to test with stale 
data.

I found Burrow worked quite well in this scenario. I created an NHibernate 
configuration file for each of the databases to use a local instance of SQL 
Server for schema comparison or an in-memory instances of SQLite to run the 
unit tests. I was comparing the schema NHibernate generated with our live 
schema to ensure the two were equivalent to give me some reassurance I was 
doing things right. I also had unit tests perform various CRUD operations to 
ensure I could select, insert, and update properly while monitoring with 
NHProf.

I remember having some issues with Burrow re-creating the database schema. I 
can't remember if I had to hack Burrow to get it to create the schema during 
initialization, but I did have to hack in a method to get Burrow to drop the 
schema on tear down. I was making a lot of changes to the mapping files to 
figure out some complex relationships and so needed NHibernate to drop the 
actual schema it had created.

I also remember having a hard time figuring out how to get Burrow to begin a 
transaction. In the end, I hacked the code to let me pass in a transaction.

I haven't looked at Burrow in a few months, but at the time Burrow in trunk 
was about a year old so was still compiled against an old version of 
NHibernate. I had to update the references and make a few changes just to 
get it work with the latest release version of NHibernate. I asked about 
that here and was told Castle is the better alternative. I've been moved to 
other projects since then and haven't had a chance to check out Castle yet.

The projects we have in production are currently using Spring.NET for both 
dependency injection and session management. The disadvantage with 
Spring.NET is that it doesn't really support multiple databases like Burrow 
so we can't use it to re-create the database schema on the fly in our unit 
tests.

--------------------------------------------------
From: "Jeffrey Palermo" <[email protected]>
Sent: Wednesday, December 23, 2009 10:20 PM
To: "nhusers" <[email protected]>
Subject: [nhusers] NHibernate.Burrow - anyone using it?

> I'm exploring Burrow, and the source is .Net 2.0 with VS 2005.  There
> is a LOT of code in there, and I was wondering who is using it, and
> what the bread-n-butter features are.  We've used our own NHibernate
> session management for some time (just a few classes), but I wanted to
> trim it back, so I looked at Burrow.  It seems like a big framework in
> and of itself, so I'd appreciate any anecdotes anyone can give.
>
> Best regards,
> Jeffrey Palermo
 

--

You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.


Reply via email to