I have migrated my application from NHibernate 1.2.1 to NHibernate 2.0.1. Now i am geting the error "Version Conflict error while compiling". It shows that application still using the NHibernate V1 but i have changed the Version by deleteing the old dll and added the new dll in application refference.
The only thing i have not changes i...
I have seen many nice things coming up for ASP.NET 4 and Silverlight 3.
The best thing i've seen is the DomainDataSource where one can create a nice separation of Business and Data Layers and present the BL in both SL and ASP.NET.
These examples make heavy use of IQuerable.
My question to my fellow developers is:
How can I implement I...
I am looking for a way to retrieve the "surrounding" rows in a NHibernate query given a primary key and a sort order?
E.g. I have a table with log entries and I want to display the entry with primary key 4242 and the previous 5 entries as well as the following 5 entries ordered by date (there is no direct relation between date and prima...
I have a named Query that uses a view. I am unable to create a class mapping because this view does not have a Id column. I created a named query and set it to return it as a class, defining all the return values. However, I still receive a KeyNotFound Exception. If I set all of the columns to It returns the List. How can you tell...
Ok, so I want to create a code behind for non-aspx classes. I have mapping files (classes) that I want to show in project as a code behind for entites. Is there a way to do that in VS2008.
...
What references are necessary to have fluent nhibernate work with mysql. I have downloaded the latest version (6.0.3.0) of the mysql connector, but it is still throwing exceptions related to the mysql driver.
Here is the exception:
{"Could not create the driver from NHibernate.Driver.MySqlDataDriver, NHibernate, Version=2.0.1.4000, Cu...
I'm trying to build a modified role system that has the following class/relationship structure:
Project
ProjectRole
Employee
where
ProjectEmployee maps the three entities together.
I have a one-to-many mapping from Project to ProjectEmployee and a reference mapping from ProjectEmployee to Project.
I can add new ProjectEmployee's ju...
How Do You Implement Specification Pattern for querying database using NHibernate?(without LINQ to NHibernate).I read a lot about Specification Pattern but most of them was about Validation and Querying Memory collection objects.
Best method as far as I know using DetachedCriteria in Specification Interface like this.
interface ISpeci...
Hello
I am using some NHibernate 1.2 code with NHibernate 2.0 and its giving me an issue with this line:
return (TId) entityMeta.GetIdentifier(entity);
its asking me to add EntityMode: POCO, Map or Xml
return (TId) entityMeta.GetIdentifier(entity, EntityMode.Map);
But which mode is the correct one to use?
Here is the whole meth...
Hello
I have a problem with:
NHibernate.Cfg.Configuration.SetProperties()
Not accepting the IDictionary: NHibernateConfigHandler
I get the messages:
Error 30 The best overloaded method match for 'NHibernate.Cfg.Configuration.SetProperties(System.Collections.Generic.IDictionary)' has some invalid arguments
and
Error 31 Argum...
Hi,
I can't get SQLite Driver working in my sessionfactory.
I downloaded SQLite 1.0.48 from http://sqlite.phxsoftware.com/
I have added the references to System.Data.SQLite in my Tests project.
public static IPersistenceConfigurer GetSqlLiteConfigurer()
{
try
{
return SQLiteConfiguratio...
Hi,
I have been whipped into submission and have started learning Fluent NHibernate (no previous NHibernate experience). In my project, I am programming to interfaces to reduce coupling etc. That means pretty much "everything" refers to the interface instead of the concrete type (IMessage instead of Message). The thought behind this is ...
Hey everyone.
I am trying to map several tables using Fluent Nhibernate. My tests are giving me the following error:
NHibernate.Exceptions.GenericADOException: could not initialize a collection: [FluentWeb.Domain.Employees.Orders#1]
I am trying to map a one to many relationship between Employees and Orders. Orders then has a many to ma...
Is the combined use of NHibernate (LGPL) and MySQL Connector/Net (GPL) inside a commercial (non-GPL) product legal if the commercial product only directly talks to NHibernate and NHibernate is talking to the MySQL Connector/Net? (And if so what part of the license(s) is telling me that it is?)
Here is what I think to know so far (correc...
I'm writing a publicly accessible web application which will contain personal user data, such as names and birth dates, and I'm required to encrypt this data in a form that will be difficult for a human who might access the raw data to decrypt. I'm using Fluent NHibernate, mySQL, and C# 3.5.
What method should I use for industry stand...
I have an class for auditing:
public class AuditAfterAdvise : IAfterReturningAdvice
This is applied to a Dao class in my Spring.Net configuration, using a RegularExpressionMethodPointcutAdvisor.
The Dao class implementation calls HibernateTemplate.SaveOrUpdate(object entity) to commit changes.
I would like to be able to apply AuditA...
Just reading about nHibernate, why do the class properties have to be virtual? What is the reasononing behind that?
...
I couldn't find an answer - does NHibernate supports MsSql2008? For example - can it convert sql XML data type to .NET XElement?
MsSqlConfiguration. shows only MsSql2005, MsSql2000 and MsSql7.
...
Could any one explain why this query works beautifully when it is called by itself to load and fully hydrate a 3 level object graph in one fell swoop, but then fail when called immediately after an update and commit has been done on one of those children within the same session. To be clear, the SQL join is correctly created in both scen...
I have an entity like:
public class Employee
{
public int ID { get; set; }
public IAccountManager AccountManager { get; set; }
...
}
I also have a mapping defined for "DefaultAccountManager" - a concrete implementation of IAccountManager. When mapping the above "Employee" entity, how do I tell NHibernate to persist/load th...