I blogged last year last year about Overriding Equals and GetHashCode . You provide an Equals override if you want to provide value equality on your business objects and normally, you'd use the logical key fields (DB lingo) for comparison. GetHashCode is used by ISet (ListSet), if you used NHibernate...
I was running a test today which uses NHibernate to load data from the database and I got this result. The inner exception details are below: Inner Exception System.TypeInitializationException Message: The type initializer for 'NHibernate.Cfg.Configuration' threw an exception. Source: NHibernate...
My boss is optimizing one of our previous projects. He was specifically looking at the queries used by NHibernate and he noticed that the generated sp_executesql queries are using nvarchar parameters. The query was just a filter for just one column (Position) and he noticed that the index for the said...
NHibernate 1.2 whose core functionality is support for generics is now available. I immediately downloaded the binaries and test it out on my test project at work (for the first time). I did some modifications (basically changing from IList, ISet to their generics equivalents), then fire off my integration...
Finally NHibernate (1.2+) is able to take advantage of .NET2.0's connectionStrings section, which previously I'd have to either declare it twice (in either config file or the dedicated hibernate.cfg.xml) All you need to do is, instead of using hibernate.connection.connection_string, use the "newer"...
i was trying out NHibernate with MySQL when i get this error message when opening a connection. problem is, i don't get the said error when i unplug my LAN cable which connects to my crappy Globe DSL (still crappy after two weeks, grrrr). i wonder why... will investigate later...
one my my officemate who haven't used NHibernate brought up the idea of caching of ORMs. i have no idea about caching resultsets from the side of NHibernate until i consulted the docs . Turns out that the caching feature is an addin to NHibernate (similar to the nullables). Basically caching will be...
recently, i blogged about an issue on NHibernate and i am very thankful to receive an email from ayende - developer behind NHibernate Query Analyzer. In his email, he told me that NHibernate was able to recognize the fault in the mapping as he can see in the log and he will try to look at it if there...
NHibernate is currently under development and one of the things that they have not really furnished are the exception messages presented when something goes wrong. i was in a hurry yesterday afternoon when i found out that the class i was working on was the wrong one so i have to transfer the codes that...
I've been trying to learn this NHibernate O/R mapper but the documentation for NHibernate is still incomplete. I was reading the incomplete docs weeks ago when i ran into this statements: Implicit polymorphism means that instances of the class will be returned by a query that names any superclass or...