I believe if you are getting this error that there is more likely something wrong with your configuration than with NHibernate. I received this error when I wanted to create a nested join between 2 unrelated tables. Something like this in HQL: [sourcecode language=”sql” padlinenumbers=”true” autolinks=”false” gutter=”false” toolbar=”false”] select tbl.CODE, av1.NUM, al1.CODE from TABLE tbl […]
Read More →Tags: C#
NHibernate MultiQuery and MultiCriteria unsupported Databases – Oracle and DB2
One of the better capabilities of NHibernate that I have recently found was the ability to group together queries on the client and execute them using only a trip to the database. What I have recently found, is that, as of writing this article and using NHibernate version 3.0 Beta 1, only SQL Server and […]
Read More →Action Delegate and Task Parallelism in C#
I wrote a WPF program recently that contained 2 tree views which were dynamically created, in part, by data located on a database. Initially, I had the creation of the tree views in my Windows_Loaded method, executing the build one after the other. The performance was ok, it took about 1.8 to 2 seconds for […]
Read More →Conditional Methods
One of, if not the most important concepts in software programming is that of Conditional Methods. Conditional methods provide a program with the ability to make decisions based on user input, user selections or data values. The code below is a simple example of a conditional method: [sourcecode language=”csharp” padlinenumbers=”true” autolinks=”false” gutter=”false” toolbar=”false”] public static […]
Read More →Interface in C#
An interface is like a contract. When a person signs a contract they are agreeing to perform in adherence to its’ contents. The person can take any action which is not specifically identified in the contract or build on top of the agreements within it. An interface has a similar concept. In this example I […]
Read More →What do C# values look like in WinDbg
One of the important areas you need to master when analyzing memory dumps is to recognize patterns that are normal and not normal. You can only come to those conclusions after looking at many, many, many, many memory dumps and either remembering or taking notes on how a process looks when all is ok, so […]
Read More →Capture NHibernate generated SQL Query real-time / at runtime
There are 6 things you need to do before you can capture the SQL Query generated by NHibernate at runtime. Create a class to store the NHibernate generated SQL Query Create an Interceptor class that implements the IInterceptor interface Implement the OnPrepareStatement method and set the NHibernate generated SQL Query created in step 1 Set […]
Read More →Hashing with Cryptography and SHA in C#
Disclaimer: Security is a very important aspect, not only for a computer system, but for an entire organization and/or company. Different types of organizations store different types of data which have different types of security requirements. My suggestion is to always consult a security expert with experience in your domain prior to implementing a security […]
Read More →Order by with LINQ to Reflection using MetadataToken and Lambda in C#
DISCLAIMER: Most if not all of the methods used with Reflection do not return their result in neither alphabetical or declaration order. This is clearly stated within the MSDN library remarks for the reflection methods. If you can avoid designing based on an expected order of results from any Reflection method, that would be best […]
Read More →Online SQL Formatter for ORM generated SQL
With the recent introduction of so many ORM’s (Object-relational mapping) tools onto the market it is becoming less and less needful to write SQL statements. Tools like NHibernate, Entity Framework and SubSonic to name a few will take your database mappings and write an optimized query for you. However, during development, testing or production support […]
Read More →