nhibernate

Subsonic Vs NHibernate

What is the concensus on when to use one of these tools adversed to the other? I find Subsonic very useful in terms of getting things done quickly, but on large projects it tends not to scale, and its ties your domain model to your database model. That is where Nhibernate comes in as it gives you lightweight POCOs that are unrelated to y...

Best way to model Many-To-One Relationships in NHibernate When Dealing With a Legacy DB?

Warning - I am very new to NHibernate. I know this question seems simple - and I'm sure there's a simple answer, but I've been spinning my wheels for some time on this one. I am dealing with a legacy db which really can't be altered structurally. I have a details table which lists payment plans that have been accepted by a customer. Each...

Data Auditing in NHibernate and SqlServer

I'm using NHibernate on a project and I need to do data auditing. I found this article on codeproject which discusses the IInterceptor interface. What is your preferred way of auditing data? Do you use database triggers? Do you use something similar to what's dicussed in the article? ...

ADO.NET Entity vs NHibernate

So the ADO.NET Entity Framework has gotten a little bit of bad press (in the form of blog entries and a petition) but I don't want to rush to judgement. I'm limited in time for experimentation but I was wondering has anyone worked with it yet with more empirical feedback? Finally, what are thoughts on using NHibernate which has been ar...

SQL 2008 Dialect Support for NHibernate

Is anyone working on or know if there exists a SQL 2k8 Dialect for NHibernate? ...

MSTest and NHibernate

Does anyone have any experience getting MSTest to copy hibernate.cfg.xml properly to the output directory? All my MSTests fail with a cannot find hibernate.cfg.xml error (I have it set to Copy Always), but my MBUnit tests pass. ...

(N)Hibernate Auto-Join

I'm developing a web- application using NHibernate. Can you tell me how to write a NHibernate Query for the following SQL query: select v1.Id from View v1 left join View v2 on v1.SourceView = v2.Id order by v1.Position It's basically a auto-join but I don't know how to write this in Nhibernate. Lets say the property names are the same ...

Windows Service Increasing CPU Consumption

At my job, I have a clutch of six Windows services that I am responsible for, written in C# 2003. Each of these services contain a timer that fires every minute or so, where the majority of their work happens. My problem is that, as these services run, they start to consume more and more CPU time through each iteration of the loop, even...

NHibernate vs LINQ to SQL

As someone who hasn't used either technology on real-world projects I wonder if anyone knows how these two complement each other and how much their functionalities overlap? ...

NHibernate 1.2 to 2.0 migration

What kinds of considerations are there for migrating an application from NHibernate 1.2 to 2.0? What are breaking changes vs. recommended changes? Are there mapping issues? ...

Is it possible to use nHibernate with Paradox database?

Is it possible to configure nHibernate to connect to Paradox database (*.db files)? ...

NHibernate and Oracle connect through Windows Authenication

How do I use Windows Authentication to connect to an Oracle database? Currently I just use an Oracle Username and password however a requirement is to give the user on install the option of selecting Windows Authentication since we offer the same as SQL. ...

NHIbernate: Difference between Restriction.In and Restriction.InG

When creating a criteria in NHibernate I can use Restriction.In() or Restriction.InG() What is the difference between them? ...

Has anyone moved to NHibernate 2.0 in a production environment?

If so, have you run into any immediate gotchas? ...

Best way to manage session in NHibernate?

I'm new to NHibernate (my 1st big project with it). I had been using a simple method of data access by creating the ISession object within a using block to do my grab my Object or list of Objects, and in that way the session was destroyed after exiting the code block. This doesn't work in a situation where lazy-loading is required, howev...

NHibernate SetTimeout on ICriteria

Could someone tell me what the units the SetTimeout(int) method in the ICriteria interface uses? Is it milliseconds, seconds, minutes or other? ...

NHibernate Session.Flush() Sending Update Queries When No Update Has Occurred

I have an NHibernate session. In this session, I am performing exactly 1 operation, which is to run this code to get a list: public IList<Customer> GetCustomerByFirstName(string customerFirstName) { return _session.CreateCriteria(typeof(Customer)) .Add(new NHibernate.Expression.EqExpression("FirstName", customerFirstName)) .List...

101 tutorial for setting up nhibernate?

I am looking for a tutorial on setting up nhibernate. There seems to be few out there, but most are either written in gibberish, or are on an extremely ancient release. Any good resources, possibly even the inclusion of fluent or a code configured install? ...

NHibernate Generators

What is the best tool for generating Entity Class and/or hbm files and/or sql script for NHibernate. This list below is from http://www.hibernate.org/365.html, which is the best any why? Moregen Free, Open Source (GPL) O/R Generator that can merge into existing Visual Studio Projects. Also merges changes to generated classes. NConstru...

IList.Cast<typeof(T)>() returns error, syntax looks ok

public static IList<T> LoadObjectListAll<T>() { ISession session = CheckForExistingSession(); var cfg = new NHibernate.Cfg.Configuration().Configure(); var returnList = session.CreateCriteria(typeof(T)); var list = returnList.List(); var castList = list.Cast<typeof(T)>(); return castList; } So, I'm getting a bui...