
In Lesson 9 you will learn how to: Configure NHibernate Implement NHibernate using C# Bind the result to a dataGridView
Read More →In Lesson 9 you will learn how to: Configure NHibernate Implement NHibernate using C# Bind the result to a dataGridView
Read More →This is a pretty common error which can be caused by a large number of reasons. I received the below error: GenericADOExcpetion could not execute query [ select ] [SQL: select ] While I was implemented the TrueFalse NHibernate data type. What I did was in my class file (class.cs) I rightly created the property […]
Read More →During the mapping process or after a data model change you may receive this error. The error message being: {“could not execute query\r\n[ select from TABLE ]”} with an inner exception of {“Ungültiger Spaltenname ‘SPALTEN NAME’.”} {“Invalid column name ‘COLUMN NAME’.”} I received this error when I was creating a many-to-one relationship between 2 classes, […]
Read More →A few months ago I wrote a question asking for solutions to this error. There were some good answers but none of them provided me with a work around that was database independent. At least something that would work with both Oracle and SQL Server. I was implementing some calculated fields in NHibernate and I […]
Read More →During the mapping process you may encounter this error. In my situation the case was that I had the wrong namespace identified within the class attribute within a bag element containing a one-to-many element, like the below. <bag name=”Customer”> <key column=”CUST_ID” /> <one-to-many class=”CompanyName.SysName.Nhibernate.Common.Customer” /> </bag> Instead of Common I had another directory […]
Read More →When you are creating your mapping files for which NHibernate uses to know the data types and relationships of the data model, you are likely to receive this error message: An association from the table TABLENAME refers to an unmapped class: CLASS The is usually generated from the class.hbm.xml file within a many-to-one mapping where […]
Read More →I was writing some new code that would use NHibernate a few days back and while I was testing it I received thie error: Could not execute query[SQL: SQL not available] The value xxx is not of type xxx.xxx.xxx and cannot be used in this generic collection. Parameter name: value de-DE: xxx ist kein Wert […]
Read More →This was a tough one. I got everything working just fine with the mappings and my classes, I even wrote some test code to check if the Parent Child data was being inserted ok. What I failed to do was create the FOREIGN KEY relationship between the Parent table and the Child table. Once I […]
Read More →This one was a toughy. I searched for some time looking for examples about HOW TO: INSERT PARENT / CHILD RELATIONSHIPS using NHIBERNATE. What I found were these really cool looking object oriented AddChild methods, many-to-one and one-to-many mapping relationships. The thing about those examples is that they do not take into account legacy database […]
Read More →I was in a meeting where we had a discussion about keeping the modifications made to a database synchronized with the NHibernate mappings. Some said that there was a method called Validate() which just needed to be run and that all that was needed. I was right, it would turn out to be skeptical of […]
Read More →