I'm using NHibernate 2.1.2.400 that is referencing log4net 1.2.10.0.
In the same project, I also use the simply accounting SDK, sadly it is still using log4net 1.2.9.0.
So I can get NHibernate to work if I reference log4net 1.2.10.0 but the…
I have a parent object which has a one to many relationship with an IList of child objects. What is the best way to delete the child objects? I am not deleting the parent. My parent object contains an IList of child objects. Here is the mapping for…
NHibernate eager loading can be done using Fetch and FetchMany, as described in NHibernate Linq Eager Fetching on Mike Hadlow's blog.
What is the difference between these two methods and under what circumstance would each be used?
I was wondering if anyone has a good solution to a problem I've encountered numerous times during the last years.
I have a shopping cart and my customer explicitly requests that it's order is significant. So I need to persist the order to the…
I have been trying to get to grips with Hibernate's inverse attribute, and it seems to be just one of those things that is conceptually difficult.
The gist that I get is that when you have a parent entity (e.g. Parent) that has a collection of…
I've seen some examples in which decimal is used in NHibernate projects for mapping to whole number columns in Oracle. Right now I'm using int and long in my program.
What are the advantages of decimal over int/long? Does it perform better?
What is the difference between SaveOrUpdate and Save/Update in NHibernate. Why wouldnt you just always use SaveOrUpdate? Also, what is the point of SaveOrUpdateCopy?
I know how to log the SQL to log4net/NLog/trace window at runtime with the show_sql configuration option.
What I'm looking for is a way to give a Query() to NHibernate retrieve the generated SQL.
I've looked through the Persister class, the…
I have an application that uses NHibernate as its ORM and sometimes it experiences performance issues due to how the data is being accessed by it. What kind of things can be done to improve the performance of NHibernate? (Please limit to one…
I would create a QueryOver like this
SELECT *
FROM Table
WHERE Field IN (1,2,3,4,5)
I've tried with Contains method but I've encountered the Exception
"System.Exception: Unrecognised method call: System.String:Boolean…
I'm trying to figure out how to use NHibernate configuration with mapping to update table schemas, rather than dropping and recreating them.
Currently I'm using the NHibernate.Tool.hbm2ddl.SchemaExport obj with FluentNHibernate to generate the…
I have an empty app.config file, but I still get NHibernate debug logs
NHibernate: SELECT this_.LogID as LogID71_0_, this_.Level as Level71_0_, this_.Message as Message71_0_, this_.EventTime as EventTime71_0_, this_.Component as ...
I tried adding…
Is there a way to persist an enum to the DB using NHibernate? That is have a table of both the code and the name of each value in the enum.
I want to keep the enum without an entity, but still have a foreign key (the int representation of the enum)…
How to configure Fluent NHibernate to output queries to Trace or Debug instead of Console?
I'm using MsSqlConfiguration.MsSql2008.ShowSql() but it has no parameters and I can't find anything on Google.