Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First of all you have an error in your mapping for "<code>LocationSearchView</code>" You define the <code>CategoryId</code> column both as a Property and part of the Composite-id. This is wrong but unfortunately it is not caught when building the mapping and is usually exposed when querying the object. check <a href="https://stackoverflow.com/questions/2298026/indexoutofrangeexception-deep-in-the-bowels-of-nhibernate/2311256#2311256">IndexOutOfRangeException Deep in the bowels of NHibernate</a></p> <p>It could be confusing the mapping parser. And i am saying <strong>confusing</strong> because in both your mappings you rely on Reflection and Convention which imply a more disciplined programming methodology:</p> <ol> <li>You don't explicitly define the <code>class</code> attribute of the <code>many-to-one</code> and <code>bag</code> elements but instead you expect from NHibernate to detect the class type from the class definition itself. If by any chance you have set in the class <code>LocationSearchView</code> the following <code>IList&lt;LocationSearchView&gt; Events {get;set;}</code> nhibernate would expect to find the <code>LocationSearchView</code> class for the defined <code>bag</code> and hence require the 3 columns to map the collection</li> <li>You have the same property names for the column names which makes development easier (it actually only makes easier the creation of mappings which you only make once or twice anyway) but in case of errors or changes it makes it harder to detect what went wrong.</li> </ol> <p>So, make your mappings richer and remove the error i mentioned with <code>CategoryId</code>, also include the classes in your post!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload